picturepan2 / spectre

Spectre.css - A Lightweight, Responsive and Modern CSS Framework
https://picturepan2.github.io/spectre/
MIT License
11.31k stars 804 forks source link

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

Open peterhil opened 3 years ago

peterhil commented 3 years ago

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 commented 3 years ago

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