Prev | Current Page 172 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"


In step two, declarations that set the same property for the same element are sorted
by their levels of importance, and their origins. A declaration can have either of
two levels of importance: declarations that are appended with the !important
statement are called important declarations; declarations that aren??™t are called
normal declarations. You can read more about !important in !important
Declarations (p. 124).
Declarations are sorted in the following order (from lowest to highest priority):
1. user agent declarations
2. normal declarations in user style sheets
3. normal declarations in author style sheets
4. important declarations in author style sheets
5. important declarations in user style sheets
The declaration with the highest priority is applied to the element. If two or more
declarations that set the same property for the same element also have the same
The Cascade, Specificity, and
Inheritance
The Ultimate CSS Reference 120
priority (that is, the same combination of importance level and origin), the cascade
proceeds to step three.


Pages:
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184