To make the post short, I just want some confirmation;
Nested !important tags on the same property always take priority the ‘deeper’ they are in the nest right?
ie;
#block {
color: #0A0A0A !important;
};
#block #block2 {
color: #FFFFFF !important;
}
#block #block2 #block3 {
color: #999999 !important;
}
So if there’s text inside block3 that is nested, it’ll get #999999 rite? Just trying to troubleshoot here, want to rule this factor out :kir:
wtf? why would you do it that way? if you get rid of important you’ll get the same result, I fail to see what you’re attempting to accomplish. of course block3 will be #999999 not because of the important flag, but because that’s where it’s at in the cascade.
Personally, I think !important tags are unnecessary and that a good designer shouldn’t have to use them unless absolutely necessary. Especially considering the fact that a bunch of !important tags in a stylesheet would bring up its file size.
That is correct.
It’s good to understand the specificity rules and cascading properties of [font=monospace]!important[/font] which are described on the CSS specification.