• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Important Declaration

Amaury

Well-known member
#3
I was just thinking of this while making a thread on TAZ and rather than create a new thread, I figured I'd bump this.

Is this another correct way of looking at it? If you search the templates for the custom CSS and templates come up (e.g., forum_list), use !important, but if there are no results, then !important wouldn't be necessary?

Also, Brogan, when you said "if you can't get the styling to stick," did you mean that without !important it works at first, but then stops, or doesn't work at all?
 

Brogan

XenForo moderator
Staff member
#4
If you use higher specificity, in most cases you won't need to use !important.

In some cases, certain templates/classes are compiled after EXTRA.css which will necessitate the use of !important.
 

Amaury

Well-known member
#5
If you use higher specificity, in most cases you won't need to use !important.

In some cases, certain templates/classes are compiled after EXTRA.css which will necessitate the use of !important.
Ah, okay. So something like this is what you mean, correct?

.subHeading = !important needed
.thread_view .subHeading = !important not needed