Re: [csswg-drafts] Discussion request: CSS usage in WICG's Formatted Text proposal (#6629)

> Only a subset of CSS would be supported (properties applicable to inline/text layout). Is there precedent for such a subset? What precedent might this be establishing for the future?

Yes, CSS has similar subsets for things like [the ::first-line pseudo](https://drafts.csswg.org/css-pseudo/#first-line-styling). This list of properties allows text styling, without requiring the browser to expose exactly what the box-tree structure of the pseudo-element is (because ::first-line isn't tree-abiding, and can cross element boundaries in odd ways).

You aren't operating under the same constraints - you've got a well-defined box-tree structure to work with. I see that your list is longer and allows a number of box-associated properties, as a result. I'd ensure that all the text-formatting properties in ::first-line's list are supported, at least; I don't want to spend the time checking if that's the case or not right now. ^_^

I believe Timed Text was assembling a similar list of properties to apply to CC boxes - we should check if that effort ever matured, and if there needs to be some concordance there. I don't recall who in the CSSWG is most connected to that - @frivoal?

> We assumed StylePropertyMap is the preferred entry point for modern CSS-OM/ Typed OM. Should legacy .style object access be included?

We don't have a precedent yet, but I *believe* this should be fine. You can treat the Typed OM API as purely string-based if you want (always setting strings, and getting the stringification of any values you pull out), and canvas-based use-cases might enjoy some of the perf benefits of getting to reuse object-based style values (no text parsing!) if they're animating stuff across frames.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 17 September 2021 17:09:09 UTC