There was no seperate implementation of :first-letter and :first-line for SVG, which is why we had crashes and incorrect layouts when those pseudo classes were used for text elements in SVG. As a result, we disabled them in security bug - https://bugs.webkit.org/show_bug.cgi?id=40031. Other browsers such as firefox, opera, (svg implementation batik) don't support it. However, after chatting with Dave, Maciej, we should consider writing these features.
:first-line doesn't make sense for texts in SVG. We don't have block level elements like paragraph in SVG. So :first-line would always be true on texts. Are there other application areas for this pseudo element?
How about :first-letter, does that apply to SVG ?
(In reply to comment #2) > How about :first-letter, does that apply to SVG ? Yea, I think so.
cut-copy-paste from 40031 In an SVG user agent that supports CSS style sheets, the following facilities from [CSS2] must be supported: --------- * CSS2's dynamic pseudo-classes :hover, :active and :focus and pseudo-classes :first-child, :visited, :link and :lang. The remaining CSS2 pseudo-classes, including those having to do with generated content, are not part of the SVG language definition. (Note: an SVG element gains focus when it is selected. See Text selection.) --------- Is it part of SVG specification or a requirement ?
Adding myself to CC list.
I attached a test case. It does not seem to run in any browser.
Safari, Chrome, and Firefox all agree on rendering for this test case. I don't believe there is any remaining compatibility issue.