W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2018

Re: [csswg-drafts] [css-shadow-parts-1] Can class name selectors apply to a part? (#3431)

From: Caridy Patiño via GitHub <sysbot+gh@w3.org>
Date: Tue, 18 Dec 2018 16:12:19 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-448275790-1545149537-sysbot+gh@w3.org>
I always thought that this will be possible only via CSS tokens/states (https://github.com/w3c/webcomponents/issues/738), where the possible states of your component are part of the public API of it, and using them in conjunction with parts seems to be enough for such styling, e.g.:

my-tabs-component::part(tab-button) {
  color: black;

my-tabs-component:state(selected)::part(tab-button) {
  color: red;

@tabatkins @domenic can you confirm that this compounding will be possible?

@JanMiksovsky this, of course, is not equivalent to what you're asking because it is not really the state of the part, but the state of the component that exposes the part, but I think it will cover a lot of ground. Also, consider that we haven't really work on the css state proposal, we need a formal proposal first.

GitHub Notification of comment by caridy
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3431#issuecomment-448275790 using your GitHub account
Received on Tuesday, 18 December 2018 16:12:20 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:41 UTC