CSS Master

(Primo) #1
Figure 1.18. Internet Explorer includes punctuation in first-letter styles

AccordingtotheCSSPseudo-elementsModuleLevel 4 specification,^10 punctuation
thatimmediatelyprecedesorsucceedsthefirstletterorcharactershouldbeincluded;
however,thespecificationisunclearaboutwhetherthisalsoappliestogenerated
punctuation.^11

Browser Bugs When Using ::first-letter
Forthemostpart,::first-letterworksasexpectedacrossbrowsers.Aswithany
CSSfeature,therearesomeedgecasesandbrowserbugsofwhichtobeaware.

InFirefox 39 andearlier,somepunctuationcharacterscauseFirefoxtoignorea
::first–letterrulesetaltogether:


  • (dash)
    $ (dollarsign)
    ^ (caret)


(^10) http://dev.w3.org/csswg/css-pseudo-4/#first-letter-pseudo
(^11) Thespecificationactuallyusesthephrase“typographicletterunit.”ThisincludesUnicodeletters
andnumbers,butalsocharactersusedinEastAsianandMiddleEasternwritingsystems.
30 CSS Master

Free download pdf