Skip to content

media: parse the function form of <general-enclosed>#192

Merged
samoht merged 1 commit into
mainfrom
media-general-enclosed-not-all
Jul 24, 2026
Merged

media: parse the function form of <general-enclosed>#192
samoht merged 1 commit into
mainfrom
media-general-enclosed-not-all

Conversation

@samoht

@samoht samoht commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Media Queries 4 §3.1 allows <function-token> <any-value>? ) as a <general-enclosed>, not just the ( <any-value> ) form cascade already took. So theme(static) is grammatical — unknown, hence false — but cascade read the identifier as a media type, tripped on the paren, and discarded the whole @media block or @import. Found on tailwindcss.com, whose entrypoint opens @import "tailwindcss" theme(static);.

The @import prelude still rejects a layer()/supports() reaching the media position: allowed once, ahead of the query, so one there is a duplicate.

Media Queries 4 3.1 allows [<function-token> ... )] as well as the
[( ... )] form cascade already took, so [theme(static)] is grammatical
(unknown, hence false), not malformed. Cascade read it as a media type and
discarded the whole rule.
@samoht
samoht force-pushed the media-general-enclosed-not-all branch from d65228a to b3115a8 Compare July 24, 2026 01:31
@samoht
samoht merged commit 49729dc into main Jul 24, 2026
5 checks passed
@samoht
samoht deleted the media-general-enclosed-not-all branch July 24, 2026 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant