Re: [csswg-drafts] [css-nesting] Allow CSS nesting for inline styles (#8752)

If I read it correctly then yes: since the style in your sample is inside the `<span>`, it should not affect its parent, so yes, it should be equivalent of inline style attribute on the `<span>`. As I understand it that redundant extra `& { }` wrapper inside the `@scope { }` should make no difference, so would really be "redundant" in a same way the inline style attribute implicit illustrative wrapper.

Examples in current draft confirm that:
- https://www.w3.org/TR/css-cascade-6/#example-52419898 shows your example just with style next to element with text (`<span>/<p>)`, not inside.
- https://www.w3.org/TR/css-cascade-6/#example-66991251 tells that _"Authors can also target or explicitly position the [scoping root](https://www.w3.org/TR/selectors-4/#scoping-root) in a selector by including either [`:scope`](https://www.w3.org/TR/selectors-4/#scope-pseudo) or [`&`](https://www.w3.org/TR/css-nesting-1/#selectordef-) in a given selector:"_

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


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

Received on Wednesday, 24 April 2024 11:00:04 UTC