@@ -1441,7 +1441,7 @@ <h4><a name=lang-pseudo>6.6.3. The language pseudo-class :lang</a></h4>
14411441< p > The difference between < code > :lang(C)</ code > and the '|=' operator
14421442is that the '|=' operator only performs a comparison against a given
14431443attribute on the element, while the < code > :lang(C)</ code > pseudo-class
1444- uses the UA's knowledge of the document's semantics to perform the
1444+ uses the UAs knowledge of the document's semantics to perform the
14451445comparison.</ p >
14461446
14471447< div class =example >
@@ -2010,23 +2010,24 @@ <h4><a name=first-line>7.1. The ::first-line pseudo-element</a></h4>
20102010paragraph.</P>
20112011</ pre >
20122012
2013+ < h5 id ="first-formatted-line "> < dfn > First formatted line</ dfn > definition in CSS</ h5 >
2014+
20132015< p > In CSS, the < code > ::first-line</ code > pseudo-element can only
20142016have an effect when attached to a block-like container such as a
20152017block box, inline-block, table-caption, or table-cell.</ p >
20162018
2017- < p > < a name ="first-formatted-line "> </ a > The "first formatted line" of an
2018- element may occur inside a
2019+ < p > The first formatted line of an element may occur inside a
20192020block-level descendant in the same flow (i.e., a block-level
2020- descendant that is not positioned and not a float). E.g., the first
2021- line of the < code > div </ code > in < code > <DIV> <P> This
2022- line...</P> </DIV> </ code > is the first line of the < code > p </ code > (assuming
2023- that both < code > p </ code > and < code > div </ code > are block-level).
2021+ descendant that is not positioned and not a float). For example,
2022+ the first line of the < code > DIV </ code > in < code > <DIV> <P> This
2023+ line...</P> </DIV> </ code > is the first line of the < code > P </ code > (assuming
2024+ that both < code > P </ code > and < code > DIV </ code > are block-level).
20242025
20252026< p > The first line of a table-cell or inline-block cannot be the first
20262027formatted line of an ancestor element. Thus, in < code > <DIV><P
20272028STYLE="display: inline-block"> Hello<BR>Goodbye</P>
20282029etcetera</DIV></ code > the first formatted line of the
2029- < code > div </ code > is not the line "Hello".
2030+ < code > DIV </ code > is not the line "Hello".
20302031
20312032< p class ="note "> < strong > Note:</ strong > Note that the first line of the
20322033< code > p</ code > in this fragment: < code > <p><br>First...</ code >
@@ -2036,8 +2037,8 @@ <h4><a name=first-line>7.1. The ::first-line pseudo-element</a></h4>
20362037< p > A UA should act as if the fictional start tags of the
20372038< code > ::first-line</ code > pseudo-elements were nested just inside the
20382039innermost enclosing block-level element. (Since CSS1 and CSS2 were
2039- silent on this case, authors should not rely on this behavior.) Here
2040- is an example. The fictional tag sequence for</ p >
2040+ silent on this case, authors should not rely on this behavior.)
2041+ For example, the fictional tag sequence for</ p >
20412042
20422043< pre >
20432044<DIV>
@@ -2056,8 +2057,8 @@ <h4><a name=first-line>7.1. The ::first-line pseudo-element</a></h4>
20562057</ pre >
20572058
20582059< p > The < code > ::first-line</ code > pseudo-element is similar to an
2059- inline-level element, but with certain restrictions. In CSS, the
2060- following properties apply to a < code > ::first-line</ code >
2060+ inline-level element, but with certain restrictions. The
2061+ following CSS properties apply to a < code > ::first-line</ code >
20612062pseudo-element: font properties, color property, background
20622063properties, 'word-spacing', 'letter-spacing', 'text-decoration',
20632064'vertical-align', 'text-transform', 'line-height'. UAs may apply other
@@ -2077,7 +2078,7 @@ <h4><a name=first-letter>7.2. The ::first-letter pseudo-element</a></h4>
20772078letter of the first line of a block, if it is not preceded by any
20782079other content (such as images or inline tables) on its line. The
20792080::first-letter pseudo-element may be used for "initial caps" and "drop
2080- caps", which are common typographical effects. This type of initial
2081+ caps", which are common typographical effects. In CSS this type of initial
20812082letter is similar to an inline-level element if its 'float' property
20822083is 'none'; otherwise, it is similar to a floated element.</ p >
20832084
@@ -2093,7 +2094,7 @@ <h4><a name=first-letter>7.2. The ::first-letter pseudo-element</a></h4>
20932094
20942095< div class ="example ">
20952096< p > Example:</ p >
2096- < p > This example shows a possible rendering of an initial cap. Note
2097+ < p > This CSS and HTML example shows a possible rendering of an initial cap. Note
20972098that the 'line-height' that is inherited by the < code > ::first-letter</ code >
20982099pseudo-element is 1.1, but the UA in this example has computed the
20992100height of the first letter differently, so that it doesn't cause any
@@ -2180,8 +2181,9 @@ <h4><a name=first-letter>7.2. The ::first-letter pseudo-element</a></h4>
21802181money."</ p >
21812182
21822183< p > In CSS, the < code > ::first-letter</ code > pseudo-element applies to
2183- block, list-item, table-cell, table-caption, and inline-block
2184- elements. < span class ="note "> < strong > Note:</ strong > A future version
2184+ block-like containers such as block, list-item, table-cell, table-caption,
2185+ and inline-block elements.
2186+ < span class ="note "> < strong > Note:</ strong > A future version
21852187of this specification may allow this pseudo-element to apply to more
21862188element types.</ span > </ p >
21872189
@@ -2193,23 +2195,23 @@ <h4><a name=first-letter>7.2. The ::first-letter pseudo-element</a></h4>
21932195
21942196< div class ="example ">
21952197< p > Example:</ p >
2196- < p > The fictional tag sequence for this HTMLfragment :
2198+ < p > The fictional tag sequence for this HTML fragment :
21972199< pre > <div>
21982200<p> The first text.</ pre >
21992201< p > is:
22002202< pre > <div>
22012203<p> <div::first-letter> <p::first-letter> T</...> </...> he first text.</ pre >
22022204</ div >
22032205
2204- < p > The first letter of a table-cell or inline-block cannot be the
2206+ < p > In CSS the first letter of a table-cell or inline-block cannot be the
22052207first letter of an ancestor element. Thus, in < code > <DIV><P
22062208STYLE="display: inline-block"> Hello<BR>Goodbye</P>
2207- etcetera</DIV></ code > the first letter of the < code > div </ code > is not the
2208- letter "H". In fact, the < code > div </ code > doesn't have a first letter.
2209+ etcetera</DIV></ code > the first letter of the < code > DIV </ code > is not the
2210+ letter "H". In fact, the < code > DIV </ code > doesn't have a first letter.
22092211
22102212< p > The first letter must occur on the < a
22112213href ="#first-formatted-line "> first formatted line.</ a > For example, in
2212- this fragment: < code > <p><br>First...</ code > the first line
2214+ this HTML fragment: < code > <p><br>First...</ code > the first line
22132215doesn't contain any letters and < code > ::first-letter</ code > doesn't
22142216match anything (assuming the default style for < code > br</ code > in HTML
221522174). In particular, it does not match the "F" of "First."
@@ -2224,25 +2226,25 @@ <h4><a name=first-letter>7.2. The ::first-letter pseudo-element</a></h4>
22242226
22252227< div class ="example ">
22262228< p > Example:</ p >
2227- < p > After the rule ' p::before {content: "Note: "}' , the selector
2228- ' p::first-letter' matches the "N" of "Note".</ p >
2229+ < p > After the rule < code > p::before {content: "Note: "}</ code > , the selector
2230+ < code > p::first-letter</ code > matches the "N" of "Note".</ p >
22292231</ div >
22302232
22312233< p class ="note "> < strong > Note:</ strong >
2232- In some cases the ::first-letter pseudo-element should include
2234+ In some cases the < code > ::first-letter</ code > pseudo-element should include
22332235more than just the first non-punctuation character on a line. For
22342236example, combining characters must be kept with their base character.
22352237Additionally, some languages may have specific rules about how to
22362238treat certain letter combinations. The UA definition of
2237- ::first-letter should include at least the default grapheme cluster as
2238- defined by UAX29 and may include more than that as appropriate. In
2239- Dutch, for example, if the letter combination "ij" appears at the
2239+ < code > ::first-letter</ code > should include at least the default grapheme
2240+ cluster as defined by UAX29 and may include more than that as appropriate.
2241+ In Dutch, for example, if the letter combination "ij" appears at the
22402242beginning of an element, both letters should be considered within the
2241- ::first-letter pseudo-element. < a href ="#refsUAX29 "> [UAX29]</ a >
2243+ < code > ::first-letter</ code > pseudo-element. < a href ="#refsUAX29 "> [UAX29]</ a >
22422244
2243- < p > If the letters that would form the ::first-letter are not in the
2245+ < p > If the letters that would form the < code > ::first-letter</ code > are not in the
22442246same element, such as "'T" in < code > <p> '<em> T...</ code > , the UA
2245- may create a ::first-letter pseudo-element from one of the elements,
2247+ may create a < code > ::first-letter</ code > pseudo-element from one of the elements,
22462248both elements, or simply not create a pseudo-element.</ p >
22472249
22482250< p > Similarly, if the first letter(s) of the block are not at the start
@@ -2251,7 +2253,7 @@ <h4><a name=first-letter>7.2. The ::first-letter pseudo-element</a></h4>
22512253
22522254< div class ="example ">
22532255< p > Example:</ p >
2254- < p > < a name ="overlapping-example "> The following example</ a > illustrates
2256+ < p > < a name ="overlapping-example "> The following CSS and HTML example</ a > illustrates
22552257how overlapping pseudo-elements may interact. The first letter of
22562258each P element will be green with a font size of '24pt'. The rest of
22572259the first formatted line will be 'blue' while the rest of the
@@ -2327,9 +2329,9 @@ <h3><a name=descendant-combinators>8.1. Descendant combinator</a></h3>
23272329 < p > represents a < code > p</ code > element that is a grandchild or later
23282330 descendant of a < code > div</ code > element. Note the whitespace on
23292331 either side of the "*" is not part of the universal selector; the
2330- whitespace is a combinator indicating that the DIV must be the
2332+ whitespace is a combinator indicating that the < code > div </ code > must be the
23312333 ancestor of some element, and that that element must be an ancestor
2332- of the P .</ p >
2334+ of the < code > p </ code > .</ p >
23332335 < p > The following selector, which combines descendant combinators and
23342336 < a href ="#attribute-selectors "> attribute selectors</ a > , represents an
23352337 element that (1) has the < code > href</ code > attribute set and (2) is
@@ -2454,7 +2456,7 @@ <h2><a name=w3cselgrammar>10. The grammar of Selectors</a></h2>
24542456< h3 > < a name =grammar > 10.1. Grammar</ a > </ h3 >
24552457
24562458< p > The grammar below defines the syntax of Selectors. It is globally
2457- LL(1) and can be locally LL(2) (but note that most UA's should not use
2459+ LL(1) and can be locally LL(2) (but note that most UAs should not use
24582460it directly, since it doesn't express the parsing conventions). The
24592461format of the productions is optimized for human consumption and some
24602462shorthand notations beyond Yacc (see < a href ="#refsYACC "> [YACC]</ a > )
0 commit comments