Re: [csswg-drafts] [css-nesting-1] Syntax Invites Errors (#7834)

> How does this round trip with serialisation when the first at-keyword encountered forms something that browser doesn't understand?

This issue is triggered by more cases than just this - using the OM to insert rules can trigger it too.

The serialization algo for CSSStyleRule will have to handle it - if the first childRule is a CSSStyleRule with a selector that wouldn't trigger the switch, it'll first serialize an `@nest;`. This'll introduce a no-op rule that didn't exist in the source, but after that it roundtrips perfectly.

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


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

Received on Friday, 7 October 2022 19:26:12 UTC