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

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