Skip to content

feat(css): align media query evaluation with MQ4 and extend features - #43

Open
TtTRz wants to merge 3 commits into
masterfrom
feat/css-media-query-mq4
Open

TtTRz wants to merge 3 commits into
masterfrom
feat/css-media-query-mq4

Conversation

@TtTRz

@TtTRz TtTRz commented Sep 10, 2026

Copy link
Copy Markdown
Member
  • support resolution/min-resolution/max-resolution (dppx, x, dpi, dpcm, infinite) and device-pixel-ratio aliases against pixel_ratio
  • support em/rem units in width/height media features
  • treat unknown media features as not all (unrescuable by not), while unknown media types stay negatable
  • make not negate the whole query instead of each condition
  • support boolean context for known features, e.g. (width)
  • match at-keywords, media types, feature names, values and units ASCII case-insensitively without allocation
  • compare width/height/resolution equality with a small epsilon
  • degrade invalid feature values to never-match instead of dropping the whole media block
  • validate non-negative resolution and sizing values

- support resolution/min-resolution/max-resolution (dppx, x, dpi, dpcm,
  infinite) and device-pixel-ratio aliases against pixel_ratio
- support em/rem units in width/height media features
- treat unknown media features as `not all` (unrescuable by `not`),
  while unknown media types stay negatable
- make `not` negate the whole query instead of each condition
- support boolean context for known features, e.g. (width)
- match at-keywords, media types, feature names, values and units
  ASCII case-insensitively without allocation
- compare width/height/resolution equality with a small epsilon
- degrade invalid feature values to never-match instead of dropping
  the whole media block
- validate non-negative resolution and sizing values
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