question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot customize Button foreground color

See original GitHub issue

In the new beta the color style on buttons are calculated based on the background color to be either #111 or #fff, I have NO idea why are this limited now? It’s a huge limitation when compared to the earlier versions.

In all other versions we have been able to set the exact color by changing the LESS (SASS in v4 alpha) variable which was an easy way to get it exactly how we needs it, now we will have to write our own .btn-* overrides to achieve the same with risk of loosing backwardscompatiblity later.

Please bring back the ability to set color using variables as before. The new system are really frustrating to work with.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
jacobmllr95commented, Aug 14, 2017

Wouldn’t it be a good idea to have a contrast-colors SASS map that is empty be default, where it’s possible to define a contrast color for a given color. The color-yiq() function could the check against this map.

When no matching contrast color was found, the current behavior could be used.

IMHO this would solve the issue for all components.

2reactions
mdocommented, Aug 14, 2017

The colors have been automated by a contrast checker to help enforce color contrast across customized themes. There should be an option to override though I suppose, and I do like the idea of a Sass map to merge for this.

Any chance you want to take a stab @jackmu95?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't seem to change text color using HTML on these buttons
I'd like both buttons to be white in colour, but can't seem to get that to work. I'm customizing a bloom (by divi)...
Read more >
How can I change the fore color of a button - Microsoft Q&A
I have this code (from another Web site) which is supposed to change the button ForeColor from black to gray when the button...
Read more >
Styling buttons - Squarespace Help Center
When buttons are set to Fill, the button's background color fills the button. When buttons are set to No Fill, the button background...
Read more >
How to make a custom button style with UIButton ... - Sarunw
Since we can't create a new button style using button ... I expected it to be light blue as define here foregroundColor =...
Read more >
Can't remove background color from behind button text
I had the same issues and you can't seem to attack the elements styles properly, but you can just using CSS inline in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found