Re: [csswg-drafts] [css-nesting-1] & representing parent elements vs parent selector (#8310)

For completeness, to compliment Miriam’s post above, note that the `.c` in the markup below is also matched by all but the final selector of that CSS snippet:

```html
<div class="a b">
  <div class="c">nesting & scope</div>
</div>
```

To make it bold, a slight adjustments to that last selector needs to be done by removing the descendant combinator from between `:scope` and `.b`, i.e:

```css
@scope (.a) {
  :scope.b .c {
    font-weight: bold;
  }
}
```

See [forked codepen demo](https://codepen.io/bramus/pen/XWBzLjr/298fc7edef7769bccd8da747a83a8272)

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


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

Received on Thursday, 19 January 2023 21:47:01 UTC