Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow each component to have its own colors and default to global ones #3086

Merged
merged 1 commit into from
Aug 27, 2020

Conversation

aredridel
Copy link
Contributor

This is a new feature.

Proposed solution

Tags and buttons did not have enough contrast for our use case, and we wanted to use a dark grey body text in most situations such as messages, not a darker flavor of the background color. It is simple enough to add intermediate variables as customization points for the colors of each element or component, allowing us to do this. It's not perfect — buttons still make more assumptions about how colors are related than we'd like — but it goes a long way toward making Bulma customizable for our uses.

Tradeoffs

  • It adds more variables
  • It's not complete. Buttons in particular have a lot of assumptions about how colors relate for use in various states. They're a complex element!

Testing Done

  • Base build and confirm colors work as they did
  • Patched bulma as we use it (via sass include and our own build) and noted that we can customize the colors for each component

Changelog updated?

No. It's unclear how to do so for unreleased changes, and it appears it's maintained more periodically in practice than with each PR.

@aredridel aredridel marked this pull request as ready for review August 21, 2020 16:08
@jgthms
Copy link
Owner

jgthms commented Aug 21, 2020

I like this idea. Will have a look at the PR.

@aredridel
Copy link
Contributor Author

Thanks! I'm still noodling on what I'd love to see out of buttons — at the moment I've locally overridden the text colors, and I'm not using light and dark variants at all, so I've got it working, but it's not clean in the slightest. But in general, I'm going for WCAG contrast and that's turning out hard to achieve in places.

@tim-reynolds-thegrommet

I definitely think this would be a nice addition. Full disclosure, I work with @aredridel so I am probably biased, but objectively having more control if a developer wants it seems like a win to me.

@jgthms jgthms merged commit da369e1 into jgthms:master Aug 27, 2020
@aredridel aredridel deleted the variables-for-colors branch August 27, 2020 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants