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

owls8521

Active member
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.
 
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.
 
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

  • Screen shot 2011-07-06 at 2.26.21 PM.webp
    Screen shot 2011-07-06 at 2.26.21 PM.webp
    86.3 KB · Views: 10
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.
 
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?
 
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.
 
Top Bottom