Re: [csswg-drafts] [mediaqueries-5] Define logical evaluation steps for custom media (#7725)

I'm not quite sure what's unclear - you evaluate it as a MQ, rather than textually substituting.

So yeah, your first example will never match, as the custom MQ will only match in screen media, while the second MQ only matches in print media. That's not problematic, it's just always-false.

If you're trying to replicate custom MQs *by doing* text substitution, you need to take care about that - two clashing media types will always result in an always-false, since precisely one media type can be true at a time. So you should handle such a case by subbing in an always-false MQ. If the two media types agree, then you can just drop the one from the custom MQ. If the outer MQ doesn't specify a type a tall, you can promote the custom MQs type to the main rule.

If PostCSS is just dropping the media type from the custom MQ, it's simply wrong.

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


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

Received on Monday, 12 September 2022 18:28:24 UTC