NEW139183
CSS first-letter property is not respected by the SVG <text> element
https://bugs.webkit.org/show_bug.cgi?id=139183
Summary CSS first-letter property is not respected by the SVG <text> element
Said Abou-Hallawa
Reported 2014-12-02 08:42:57 PST
Created attachment 242409 [details] Test first-letter style element with the svg <text> element. Open the attached file and compare it with the expected results. They should be identical. The CSS first-letter is not respected by the SVG text element. If the selector is text::first-letter or ::first-letter is in the style section of the svg, it has no effect. It is expected to have the first letter drawn with the style specified in the first-letter element. NOTE: The attached file is an imported test from Mozilla test suite for svg
Attachments
Test first-letter style element with the svg <text> element. (387 bytes, image/svg+xml)
2014-12-02 08:42 PST, Said Abou-Hallawa
no flags
Expected file (355 bytes, image/svg+xml)
2014-12-02 08:43 PST, Said Abou-Hallawa
no flags
Said Abou-Hallawa
Comment 1 2014-12-02 08:43:30 PST
Created attachment 242411 [details] Expected file
Radar WebKit Bug Importer
Comment 2 2014-12-02 08:44:01 PST
Karl Dubost
Comment 3 2026-04-02 07:16:55 PDT
This is tested here https://wpt.fyi/results/svg/text/reftests/first-letter.svg ``` <svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml"> <metadata> <h:title>first-letter should apply to SVG text</h:title> <h:link rel="help" href="https://www.w3.org/TR/SVG2/text.html#TextProperties"/> <h:link rel="match" href="first-letter-ref.svg"/> <h:link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> </metadata> <style> text { font-family: Ahem; font-size: 50px; } text::first-letter { fill: green; } </style> <text x="100" y="100"> <tspan>XXXX</tspan> </text> </svg> ```
Note You need to log in before you can comment on or make changes to this bug.