- From: Robert Longson via GitHub <sysbot+gh@w3.org>
- Date: Wed, 07 Feb 2024 17:21:08 +0000
- To: public-css-archive@w3.org
longsonr has just created a new issue for https://github.com/w3c/csswg-drafts:
== SVG only CSS text properties should not apply to ::placeholder, but should apply to ::first-line/::first-letter ==
[css-pseudo]
The [specification](https://drafts.csswg.org/css-pseudo/#placeholder-pseudo) says
> All properties that apply to the [::first-line](https://drafts.csswg.org/css-pseudo/#selectordef-first-line) pseudo-element also apply to the [::placeholder](https://drafts.csswg.org/css-pseudo/#selectordef-placeholder) pseudo-element.
However the [SVG 2 specification](https://www.w3.org/TR/SVG2/text.html#TextProperties) says...
> Additionally, the @font-face rule must be supported for font selection as well as the ::first-line and ::first-letter pseudo-elements must be supported on ‘[text](https://www.w3.org/TR/SVG2/text.html#TextElement)’ elements.
No mention of ::placeholder in SVG 2 and I don't really see how you can have SVG text as a placeholder. Whereas SVG text content obviously has a first letter and somewhat less obviously a first line. E.g.
<svg><text>First</text></svg>
The letter F is the first-letter and we should be able to apply the usual set of SVG text formatting to it e.g. fill, stroke, stroke-width etc.
So perhaps the [css-pseudo] specification should instead say something like
> All properties that apply to the [::first-line](https://drafts.csswg.org/css-pseudo/#selectordef-first-line) pseudo-element also apply to the [::placeholder](https://drafts.csswg.org/css-pseudo/#selectordef-placeholder) pseudo-element, except for those that solely affect SVG text elements.
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9918 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 7 February 2024 17:21:11 UTC