- From: Ryosuke Niwa <notifications@github.com>
- Date: Mon, 13 Feb 2017 13:48:17 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 13 February 2017 21:48:52 UTC
> Just to reiterate, it's not similar "in some sense" - it's *exactly* as powerful in a direct-translation sense - `@apply` and `::theme()` are mirrors of each other, just living in different parts of the CSS syntax space. And `@apply` is only very slightly more powerful `var()`, just way more convenient for the use-case of allowing arbitrary styling on an element (only "more power" is that it allows setting arbitrary custom properties, which can't have their names predicted ahead of time). "*exactly* as powerful" is a misleading statement given `@apply` can be used without any shadow trees even if there was an equivalent expressibility when it comes to styling parts of components across shadow boundaries. I can see some people may want to be using mix-ins outside the context of shadow trees, so for them `@apply` is a lot more useful than `::theme` which seems to only work on parts defined inside a shadow tree. Having said that, we're all for focusing on `::part` first regardless of what happens to `@apply` vs `::theme` since `::part` is the feature what we always wanted. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/300#issuecomment-279533401
Received on Monday, 13 February 2017 21:48:52 UTC