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

That explainer looks pretty reasonable as the way to control preference MQs!

>  Its a different API shape (not using custom media queries)

The "correct" solution was never intended to involve custom MQs, fwiw, that was just listed as the way authors would be able to work around the lack of a preference override if we never did anything. Overriding preferences directly is definitely better.

> I'd be curious for people's thoughts on my proposal?

Overall I think your design looks just fine. Note the discussion in this thread about which descendant frames can see the overridden preference; any cross-origin frame that can communicate with the external world shouldn't see them (and should instead just get the original real user preference). But same-origin frames, and cross-origins that can't communicate, should be able to see the overrides (probably invisibly; that is, they'll just see it as user's preference). I'll open some issues over on your repo.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 31 August 2023 20:00:54 UTC