mirror of
https://github.com/vasanthk/how-web-works.git
synced 2026-11-02 05:24:10 +08:00
Update specificity examples format
This commit is contained in:
20
README.md
20
README.md
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user