Re: [csswg-drafts] [css-shadow-parts] consider moving part-mapping to style rules

This seems like a pretty powerful alternative to the current spec. It seems like it could be the exclusive way to describe parts. Consider:

```
// Defining Parts
// in x-foo
<style>
  .thumb.active {
    @part(thumb-active);
  }
</style>

// Forwarding Parts
// in x-host that contains an x-foo
<style>
  x-foo::part(thumb-active) {
    @part(x-foo-thumb-active);
  }
</style>
```

This would make it pretty easy to define parts that match complex selectors. For example, this would make it easier to expose parts for the "red" and "black" squares on a checkerboard.

If this is at all feasible to implement it seems worth exploring, at least briefly.

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

Received on Wednesday, 25 July 2018 00:21:42 UTC