Want to share your CSS expertise with others? Apply to the MDN Fellowship by April 1! http://mzl.la/MDNFellowship

mozilla

Compare Revisions

::first-letter (:first-letter)

Change Revisions

Revision 35625:

Revision 35625 by teoli on

Revision 35626:

Revision 35626 by teoli on

Title:
::first-letter (:first-letter)
::first-letter (:first-letter)
Slug:
CSS/::first-letter
CSS/::first-letter
Tags:
css, "CSS Reference", Selectors
css, "CSS Reference", Selectors
Content:

Revision 35625
Revision 35626
t17      Punctuation, that is any characters defined in Unicode in tt17      The first letter of an element is not necessary trivial to 
>he <em>open</em> (Ps), <em>close</em> (Pe), <em>initial quote</em>identify:
>> (Pi), <em>final quote</em> (Pf) and <em>other punctuation</em>  
>(Po) classes, preceding or immediately following the first letter 
> is also matched by this pseudo-element. 
18    </p>
19    <p>18    </p>
19    <ul>
20      <li>Punctuation, that is any characters defined in Unicode 
 >in the <em>open</em> (Ps), <em>close</em> (Pe), <em>initial quote
 ></em> (Pi), <em>final quote</em> (Pf) and <em>other punctuation</
 >em> (Po) classes, preceding or immediately following the first le
 >tter is also matched by this pseudo-element.
21      </li>
20      Similarly some languages have digraphs that are always capi22      <li>Similarly some languages have digraphs that are always 
>talized together, like the <code>IJ</code> in Dutch. In these rar>capitalized together, like the <code>IJ</code> in Dutch. In these
>e cases, both letters of the digraph should be matched by the <co> rare cases, both letters of the digraph should be matched by the
>de>::first-letter</code> pseudo-element. (This is poorly supporte> <code>::first-letter</code> pseudo-element. (This is poorly supp
>d by browsers, watch the <a href="/En/CSS/::first-letter#Browser_>orted by browsers, watch the <a href="/En/CSS/::first-letter#Brow
>compatibility" title="https://developer.mozilla.org/En/CSS/::firs>ser_compatibility" title="https://developer.mozilla.org/En/CSS/::
>t-letter#Browser_compatibility">browser compatibility table</a>)>first-letter#Browser_compatibility">browser compatibility table</
 >a>).
23      </li>
24      <li>Finally, a combination of the {{ cssxref("::before") }}
 > pseudo-element and the {{ cssxref("content") }} property may inj
 >ect some text at the beginning of the element. In that case, <cod
 >e>::first-letter</code> will match the first letter of this gener
 >ated content.
25      </li>
21    </p>26    </ul>

Back to History