Home › Forums › Gillion Theme › Custom styling – overusing of "!important" rule
Home › Forums › Gillion Theme › Custom styling – overusing of "!important" rule
Hi,
when comes to custom styling of different site elements i.e. posts headers, comments, post meta, mega menu items it’s necessary to add almost everywhere “important” rule. Why is that? Could you please check it? Such amount of imoportant rules is not the best solution for the overall look of the code.
Thanks!
I hope you are well today and thanks for posting here.
Yes we could confirm it which was added to set higher level of CSS specificity but we will remove it in the future version of theme and do it another way.
Best regards,
Shufflehound team
Thanks for the reply. So for now theres no other way to style the theme than using “important”?
If you want to override the theme style which is using !important then you have to use !important in your style and make the selector more specific.
You will find more information about this on the following pages.
https://www.smashingmagazine.com/2007/07/css-specificity-things-you-should-know/
https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity