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

Re: [csswg-drafts] [css-conditional-4] selector() feature query function for selector support

From: jonjohnjohnson via GitHub <sysbot+gh@w3.org>
Date: Wed, 07 Nov 2018 21:48:06 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-436789451-1541627284-sysbot+gh@w3.org>
I know we are talking about syntax for a **feature** query, and a lot has already been brought up, but wanted to make sure it was addressed that previously the concept of a "selector" query was mentioned to match a selector against the current state of the document.

In https://github.com/w3c/csswg-drafts/issues/112#issuecomment-221672439 @tabatkins  said...

> @fantasai So if we pretend there's a selector() function that is true if something on the page matches that selector, I think you'd write:
> 
> @when selector(body.toc-inline) or (media(width < 28em) and not selector(body.toc-sidebar)) {
>   /* inline ToC styling */
> } @else {
>   /* sidebar ToC styling */
> }

Figured it worth mentioning, even if some other syntax like `query()` could be better.

-- 
GitHub Notification of comment by jonjohnjohnson
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3207#issuecomment-436789451 using your GitHub account
Received on Wednesday, 7 November 2018 21:48:07 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 2 July 2022 03:21:14 UTC