Re: [csswg-drafts] [css-pseudo-4] `::nth-letter` pseudo-element (#3208)

Thinking… Maybe that's a use case better suited for shadow DOM? If scripting is confined therein, authors reaching for reusable components needn't be concerned much. The text could be programatically split into text nodes in the light corresponding to grapheme clusters and `span`s inserted around each in the shadow. What remains is indexing – `::part` and `::theme` don't take arguments, maybe they should optionally to be resolved by script or some CSS variables in selectors machinery? Or is is Houdini's domain whereby an actual `nth-letter()` selector working in tandem with shadow DOM could be added (in which case I'd rather make it more general, e.g. `nth-specially-marked-item-in-container()`)?

-- 
GitHub Notification of comment by ByteEater-pl
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3208#issuecomment-589903606 using your GitHub account

Received on Saturday, 22 February 2020 01:45:18 UTC