Home › Forums › CSS › how to override an external library without !important? › Reply To: how to override an external library without !important?
January 15, 2018 at 12:56 am
#265448
JeroenR
Participant
Without an example it’s hard to say. But let’s assume you use a custom stylesheet, then make sure you use CSS selectors with at least the same selector as the style you want to override, or make it more specific. I understand you don’t want to use important. I’m not a big fan of using IDs for styling as well.
So you can either use your own added classnames, the same CSS selector, or a more specific CSS selector using the context your element is in.
And then make sure your custom stylesheet is loaded later then the library you use.