Prev | Current Page 180 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"


An important declaration in an author style sheet has more weight than a normal
declaration in an author style sheet, but an important declaration in a user style
sheet will trump them both.
In CSS1, important declarations in an author style sheet had greater weight than
important declarations in a user style sheet. In order to improve the accessibility
of documents that use CSS for presentation, CSS2 reversed the ranking and gave
important declarations in user style sheets the highest weight. This facility allows
users with special needs to specify desired settings like a larger font size, and to be
confident that those settings will be applied.
4 http://getfirebug.com/
5 http://webkit.org/blog/?p=41
6 http://dev.opera.com/tools/
7 http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038
125 The Cascade, Specificity, and Inheritance
Here??™s an example of an important declaration??”in this case, a font-size declaration:
p {
font-size: 1em !important;
}
If important declarations have the same origin, the normal rules of specificity and
order specified apply.


Pages:
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192