- From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
- Date: Mon, 14 Jan 2019 02:59:25 +0000
- To: public-css-archive@w3.org
frivoal has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-shadow-parts] Limited ::theme selector == (Split from issue #3467, reported by @stefsullrew) The current description of the *::theme* selector is perhaps a bit too broad for real world usage. However the ability to access any *::part* within the context of a component, without elaborate `exportparts=` chains would be much easier to work with in the context of a design system. In the example below, a theme context is defined for `**x-foo**` with the prefix of “`foo-`*”*. This would grant access to all child parts that match the name within the declared theme's context. This scoping limits the reach of *::theme* while avoiding the potentially complex *exportparts=* chains. Particularly when there's deep composition of components not owned by a single team. ``` <x-foo theme="foo-"> <x-bar></x-bar> <x-oof></x-oof> </x-foo> // x-bar definition <x-bar> <p part="metadata">Posted on: 2019-01-10</p> </x-bar> // x-oof definition <x-oof> <svg part="icon"></svg> </x-oof> ``` ``` x-foo::theme(foo-metadata) { color: grey; font-style: italic; } ``` Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3507 using your GitHub account
Received on Monday, 14 January 2019 02:59:26 UTC