Update specificity examples format

This commit is contained in:
Vasa
2015-10-17 11:16:41 -07:00
parent 162f85c0ac
commit 69153715e1

View File

@@ -149,15 +149,17 @@ Concatenating the three numbers a-b-c-d (in a number system with a large base) g
Examples:
- * /* a=0 b=0 c=0 -> specificity = 0 */
- LI /* a=0 b=0 c=1 -> specificity = 1 */
- UL LI /* a=0 b=0 c=2 -> specificity = 2 */
- UL OL+LI /* a=0 b=0 c=3 -> specificity = 3 */
- H1 + *[REL=up] /* a=0 b=1 c=1 -> specificity = 11 */
- UL OL LI.red /* a=0 b=1 c=3 -> specificity = 13 */
- LI.red.level /* a=0 b=2 c=1 -> specificity = 21 */
- #x34y /* a=1 b=0 c=0 -> specificity = 100 */
- #s12:not(FOO) /* a=1 b=0 c=1 -> specificity = 101 */
``` txt
* /* a=0 b=0 c=0 -> specificity = 0 */
LI /* a=0 b=0 c=1 -> specificity = 1 */
UL LI /* a=0 b=0 c=2 -> specificity = 2 */
UL OL+LI /* a=0 b=0 c=3 -> specificity = 3 */
H1 + *[REL=up] /* a=0 b=1 c=1 -> specificity = 11 */
UL OL LI.red /* a=0 b=1 c=3 -> specificity = 13 */
LI.red.level /* a=0 b=2 c=1 -> specificity = 21 */
#x34y /* a=1 b=0 c=0 -> specificity = 100 */
#s12:not(FOO) /* a=1 b=0 c=1 -> specificity = 101 */
```
WebKit uses a flag that marks if all top level style sheets (including @imports) have been loaded. If the style is not fully loaded when attaching, place holders are used and it is marked in the document, and they will be recalculated once the style sheets were loaded.