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

Re: [csswg-drafts] [selectors4] Name the “functional pseudo-class like :matches() with 0 specificity”

From: inoas via GitHub <sysbot+gh@w3.org>
Date: Wed, 11 Jul 2018 08:44:29 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-404092446-1531298668-sysbot+gh@w3.org>
@LeaVerou 
`:if` has a strong procedural meaning whereas `:where` has not and I share your fear that `:if` may or may not become useful for other purposes in future.

@CyberAP 
> ... from a functional side of things. What this selector ... tries to do is to set a default value that can be easily overridden, so :defaults() comes to mind.
> However, there is a :default pseudo-class and that may of course confuse people.

What about `:initial()` then. It behaves similiar to resetting a bunch of values to `property: initial`.
```css
/* Some basic/reset stylesheet */
a:initial(.toggled) { color: green; }

/* Some concrete stylesheet */
a { color: red }
```

-- 
GitHub Notification of comment by inoas
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2143#issuecomment-404092446 using your GitHub account
Received on Wednesday, 11 July 2018 08:44:34 UTC

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