Best Practices for Overriding CSS? #890
Unanswered
bmulholland
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to make a few customizations to the styling (e.g. I have a default color set, and the default CSS overrides that, so I need to override-override back to my default).
There are two options to do this:
The problem with #1 is it's not really best practices in CSS land. It immediately gets into CSS selector precedence, doing override-overrides, and the existing
color
, for instance, is in a theme, while I probably want to apply something globally.Meanwhile, #2 is a recipe for bugs and issues upgrading. If the HTML structure or expected CSS changes, we'll have to manually update the file we've copied (and merge in any customized deltas). Moreover, we'd have to manually catch that the CSS needs this update, and it's more likely that we'd simply forget and get out of date.
Questions:
Beta Was this translation helpful? Give feedback.
All reactions