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

Re: [csswg-drafts] [css-ui-4][css-images-4][scroll-animations-1] Unify selector functions/values (#5811)

From: Bramus! via GitHub <sysbot+gh@w3.org>
Date: Wed, 14 Jul 2021 11:53:46 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-879827284-1626263625-sysbot+gh@w3.org>
Building further upon what @SebastianZ suggested: if `selector()` would indeed behave more like `document.querySelector`, adding support for [`&` (as borrowed from css-nesting)](https://drafts.csswg.org/css-nesting/#nest-selector) would also allow to refer to “self” _(and more)_

This would come in very handy for scroll-linked animations, where you now have to duplicate timelines _(see #5884)_

Above that, the whole idea for being more like `document.querySelector` would:
- feel familiar to CSS developers as they already know the possibilities of using selectors
- not introduce any new keywords such as `self` into specs: “use `selector(&)` instead”

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 14 July 2021 11:53:48 UTC

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