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

Re: [csswg-drafts] [mediaqueries-5] Script control of (prefers-*) queries (#6517)

From: jimmyfrasche via GitHub <sysbot+gh@w3.org>
Date: Fri, 13 Aug 2021 21:38:55 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-898733243-1628890733-sysbot+gh@w3.org>
Thank you for filing the issue @tabatkins

While out of scope, I do think it's important to consider web extensions here. Namely, a very natural extension is one that lets you toggle preferences per site and if there's only one thing to set then there's a race between the site and the extension: if they both attempt to override the preference the last one to do so wins.

That will be confusing for users and a perennial source of consternation for the poor maintainer fielding bug reports.

I suppose if the browser could tell whether an extension or a site updated a preference media query then they could use that information to apply precedence but that seems over complicated making it less likely that they're willing to do anything. I'm not sure how they would do that unless CSS is available to web extensions or browsers track scripts injected into sites.

Also unless overriding media queries rolls out with custom media queries how would you feature test this without overrding a preference which could itself mess with such an extension.

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 13 August 2021 21:38:57 UTC

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