@@ -593,7 +593,7 @@ <h3 id="profiles">
593593
594594 < p class ='issue '>
595595 The categorization of things into the "fast" or "complete" profiles needs implementor review.
596- If some things currently not in the fast profile can reasonably be done in CSS Selectors,
596+ If some things currently not in the fast profile can reasonably be done in CSS Selectors,
597597 we should move them.
598598
599599
@@ -1576,20 +1576,20 @@ <h3 id="class-html">
15761576< h3 id ="id-selectors ">
15771577ID selectors</ h3 >
15781578
1579- < p > Document languages may contain attributes that are declared to be of type ID.
1580- What makes attributes of type ID special
1581- is that no two such attributes can have the same value in a conformant document,
1582- regardless of the type of the elements that carry them;
1583- whatever the document language,
1584- an ID typed attribute can be used to uniquely identify its element.
1585- In HTML all ID attributes are named < code > id</ code > ;
1586- XML applications may name ID attributes differently,
1587- but the same restriction applies.
1579+ < p > Document languages may contain attributes that are declared to be of type ID.
1580+ What makes attributes of type ID special
1581+ is that no two such attributes can have the same value in a conformant document,
1582+ regardless of the type of the elements that carry them;
1583+ whatever the document language,
1584+ an ID typed attribute can be used to uniquely identify its element.
1585+ In HTML all ID attributes are named < code > id</ code > ;
1586+ XML applications may name ID attributes differently,
1587+ but the same restriction applies.
15881588 Which attribute on an element is considered the “ID attribute“ is defined by the document language.
15891589
1590- < p > An < dfn > ID selector</ dfn > consists of a “number sign” (U+0023, < code > #</ code > )
1591- immediately followed by the ID value,
1592- which must be a CSS < a href ="http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier "> identifier</ a > .
1590+ < p > An < dfn > ID selector</ dfn > consists of a “number sign” (U+0023, < code > #</ code > )
1591+ immediately followed by the ID value,
1592+ which must be a CSS < a href ="http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier "> identifier</ a > .
15931593 An ID selector represents an element instance that has an identifier that matches the identifier in the ID selector.
15941594 (It is possible in non-conforming documents for multiple elements to match a single ID selector.)
15951595
@@ -1822,7 +1822,7 @@ <h3 id="local-pseudo">
18221822 < pre > nav :local-link { text-decoration: none; }</ pre >
18231823 </ div >
18241824
1825- < p > As a functional pseudo-class, < code > :local-link()</ code > can also accept a non-negative integer as its sole argument,
1825+ < p > As a functional pseudo-class, < code > :local-link()</ code > can also accept a non-negative integer as its sole argument,
18261826 which, if the document's URL belongs to a hierarchical scheme,
18271827 indicates the number of path levels to match:
18281828 < ul >
@@ -1837,7 +1837,7 @@ <h3 id="local-pseudo">
18371837 underline.
18381838 < pre > :not(:local-link(0)) { text-decoration-style: dashed; }</ pre >
18391839 </ div >
1840-
1840+
18411841 < p > Path segments are portions of the URL's path that are separated by forward slashes (/).
18421842 If a segment is missing from the document's URL,
18431843 a pseudo-class requiring that segment to match does not match anything.
@@ -1883,7 +1883,7 @@ <h3 id="local-pseudo">
18831883 the functional pseudo-class matches nothing.
18841884
18851885 < p class ="issue ">
1886- It's clear that, if the document URL has at least N segments,
1886+ It's clear that, if the document URL has at least N segments,
18871887 then < code > :local-link(N)</ code > only matches links whose URL has at least N segments.
18881888 (This lets you assign consistent semantics to :local-link so that,
18891889 for example, :local-link(2) means a "within-repo" link on GitHub.)
@@ -2754,7 +2754,7 @@ <h3 id="selected-child-index">
27542754 The '':nth-match()'' and '':nth-last-match()'' pseudo-classes
27552755 allow one to build a selector for the latter interpretation.
27562756
2757- < p > In the < i > fast</ i > Selectors profile, only lists of < i > compound selectors</ i > are allowed within these selectors.
2757+ < p > In the < i > fast</ i > Selectors profile, only lists of < i > compound selectors</ i > are allowed within these selectors.
27582758 In the < i > complete</ i > profile, full < i > complex selectors</ i > are allowed.
27592759
27602760< h4 id ="the-nth-match-pseudo ">
@@ -3006,17 +3006,19 @@ <h3 id="the-nth-last-column-pseudo">
30063006< h2 id ="specificity ">
30073007Calculating a selector's specificity</ h2 >
30083008
3009- < p > A selector's specificity is calculated as follows:
3009+ < p > A selector's specificity is calculated for a given element as follows:
30103010
30113011 < ul >
3012- < li > count the number of ID selectors in the selector (= < var > A</ var > )
3013- < li > count the number of class selectors, attributes selectors, and pseudo-classes in the selector (= < var > B</ var > )
3014- < li > count the number of type selectors and pseudo-elements in the selector (= < var > c </ var > )
3012+ < li > count the number of ID selectors in the selector (= < var title ='' > A</ var > )
3013+ < li > count the number of class selectors, attributes selectors, and pseudo-classes in the selector (= < var title ='' > B</ var > )
3014+ < li > count the number of type selectors and pseudo-elements in the selector (= < var title ='' > C </ var > )
30153015 < li > ignore the universal selector
30163016 </ ul >
30173017
3018- < p > The specificity of a < a href ="#matches "> :matches()</ a > pseudo-class is
3019- the specificity of the most specific complex selector that matched.
3018+ < p >
3019+ In most cases, a selector has the same specificity for every element it applies to.
3020+ The specificity of a < a href ="#matches "> :matches()</ a > pseudo-class, however,
3021+ is the specificity of the most specific complex selector that matched the given element.
30203022 (The full selector's specificity is equivalent to expanding out all the combinations in full, without < code > :matches()</ code > .)
30213023 The specificity of a < a href ="#negation "> :not()</ a > pseudo-class is
30223024 the specificity of the most specifc complex selector in its selector list.
@@ -3025,17 +3027,17 @@ <h2 id="specificity">
30253027
30263028 < p >
30273029 Specificities are compared by comparing the three components in order:
3028- the specificity with a larger < var > A</ var > value is more specific;
3029- if the two < var > A</ var > values are tied,
3030- then the specificity with a larger < var > B</ var > value is more specific;
3031- if the two < var > B</ var > values are also tied,
3032- then the specificity with a larger < var > c </ var > value is more specific;
3030+ the specificity with a larger < var title ='' > A</ var > value is more specific;
3031+ if the two < var title ='' > A</ var > values are tied,
3032+ then the specificity with a larger < var title ='' > B</ var > value is more specific;
3033+ if the two < var title ='' > B</ var > values are also tied,
3034+ then the specificity with a larger < var title ='' > C </ var > value is more specific;
30333035 if all the values are tied,
30343036 the two specifities are equal.
30353037
30363038 < p >
30373039 Due to storage limitations,
3038- implementations may have limitations on the size of < var > A</ var > , < var > B</ var > , or < var > c </ var > .
3040+ implementations may have limitations on the size of < var title ='' > A</ var > , < var title ='' > B</ var > , or < var title ='' > C </ var > .
30393041 If so, values higher than the limit must be clamped to that limit,
30403042 and not overflow.
30413043
0 commit comments