Re: [csswg-drafts] Idea: Properties with Object Values (#9502)

Right, using {}-blocks just as an alternate syntax for shorthand properties potentially makes sense, tho we'd almost certainly need more justification for it. It's simply not much of a burden to repeat the prefix of the property name a few times. If CSS nested its shorthands more deeply there would be a larger argument, but we rarely go past a single level, and I don't think we ever do more than two.

For expressing JS data directly in CSS, that's much more fraught. JS syntax isn't fully compatible with CSS in several corners. You can use a custom prop for this, if you manually parse/serialize thru JSON.

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


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

Received on Friday, 20 October 2023 18:52:17 UTC