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

Not a bug  EXTRA.css doesn't override polls.css or account.css

owls8521

Active member
#1
When I make changes in EXTRA.css, it gets overrided by both polls.css and account.css. It makes it impossible to edit css of polls or accounts without editing the css template files. I believe EXTRA.css is supposed to override everything, so I think this is a bug.
 

Steve F

Well-known member
#3
You may have to use "!important" after your class

Example:

Code:
color: #fff !important;
Not a bug, those css templates are being loaded after the EXTRA.css is loaded.
 

owls8521

Active member
#4
I'm working at the same level of specificity as polls.css. I included a screenshot to show it. As you can see, I'm trying to override the color property for .pollBlock .question .questionText. I wrote that it should be white in EXTRA.css. But then as you can see, it is being overridden by the color in polls.css, which is gray.

EDIT: Writing !important fixed the problem. Thanks Qwk86gn!
 

Attachments

Romchik®

Well-known member
#8
It has been suggested, but...
I still think that this is not correct. Defeats the purpose of this file.
And do not talk about !important. This is not entirely correct.
 

Kier

XenForo Developer
Staff member
#9
EXTRA.css could be the very last thing loaded and it would make absolutely no difference if higher levels of specificity than the other scripts are not provided. And what's the objection to !important anyway?
 

Romchik®

Well-known member
#11
I have a hard pick arguments in English.

Because I always believed that I should avoid frequent use of !important. Otherwise it may cause confusion.
If possible, I'd better write a chain of classes ( .className .className2 p a {... ).
This is why I am against. But this does not mean that without it I would not be able mark up style.
The filename isn't called "extreme_last_css_loaded.css"
It's to assist in customizing the theme, extra css.
In the vB forum this template is called additional.css, but if I'm not mistaken, does not require !important value.

It would be ideal of course, if the system detects a similar class in the EXTRA.css and replaces them basic class.
And so we have a double definition, which is not good if we have a lot of them.

But it is probably to difficult or badly affect performance.