mapbox / assembly

Making the hard parts of designing for the web easy.
https://www.mapbox.com/assembly/
134 stars 27 forks source link

*-faint colors also not available for buttons #945

Closed thefifthisa closed 3 years ago

thefifthisa commented 4 years ago

According to the documentation, *-dark colors aren't available for buttons, but it seems *-faint colors aren't valid color variants either. (They default to blue if used.) The buildColorVariants function or docs should be updated in this case.

samanpwbb commented 4 years ago

@thefifthisa check out https://github.com/mapbox/assembly/blob/publisher-staging/scripts/build-color-variants.js#L71-L93 for code that builds button variants. We intentionally exclude faint because they're too low contrast. Now, I can see a good argument against doing this: you want to use faint buttons against a dark background. For that reason, we could consider expanding the button color rules.

There's a workaround in the meantime: use something like bg-blue-faint color-blue-faint bg-blue-light-on-hover color-blue-light-on-hover.

samanpwbb commented 3 years ago

Going to close this and add wontfix label. Open to proposals for how to refactor color variants to allow dark text on light backgrounds in a separate issue.