Posts

Showing posts from July 26, 2009

What's a Letter in CSS's first-letter Pseudo-element?

perm url with updates: http://xahlee.org/js/css_first_letter.htmlWhat's a Letter in CSS's first-letter Pseudo-element?Xah Lee, 2009-07-28Looks like Firefox 3.5 broke this css: div.xxx:first-letter {font-size:xx-large; color:red} The first letter is not colored or bigger if the first char is the unicode “∑” (N-ARY SUMMATION; U2211).Try this sample file: css_first_letter_test.htmlVersions before Firefox 3.5 will work fine, as well as the currently released versions (2009-07-28) of Safari, Opera, Google Chrome, Internet Explorer 8.The question is, is Firefox 3.5's behavior correct by W3C? The spec is here: http://www.w3.org/TR/CSS2/selector.html#first-letterHowever, the spec does not seem to be exactly clear on this.Jukka K Korpela gives a good analysis of the situation: Newsgroups: comp.infosystems.www.authoring.stylesheets Date: Tue, 28 Jul 2009 19:25:57 +0300 Subject: Re: firefox 3.5 broke css :first-letter Source