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

Using !important on color mixins makes the color utility classes unusable as cascading styles #675

Open
peterhil opened this issue Apr 12, 2021 · 1 comment

Comments

@peterhil
Copy link

peterhil commented Apr 12, 2021

This commit with the !important rules on the color mixins make the color utility classes unusable, because CSS styles can not be cascaded into more specific element in the page.

Without them, one could use .bg-dark on body, and .bg-light on cards or some other repeating element for example.
A library like this should never use !important, IMHO.

Another thing is that using background instead of background-color prevents using background images.

CSS specificity rules can help in avoiding too specific style declarations:

@peterhil
Copy link
Author

On the other hand, I guess the color utility classes are meant to be used sparingly.

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

No branches or pull requests

1 participant