W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2021

Re: [csswg-drafts] [css-nesting] :selector-replace() pseudo-class function (#6330)

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Mon, 31 May 2021 16:19:06 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-851583717-1622477944-sysbot+gh@w3.org>
I would probably use something like

```css
.component {
  color: green;
  --child-color: unset;
  & .container {
    color: brown;
  }
  &:focus {
    --child-color: red;
  }
  & .container.active {
    --child-color: white;
  }
  & .child {
    color: var(--child-color, blue);
    &:hover {
      color: var(--child-color, yellow);
    }
  }
}
```

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 31 May 2021 16:19:16 UTC

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