Re: [csswg-drafts] [mediaqueries-5] Introduce `@size` rule for defining reusable media query size values (#10487)

While _size_ usually consists of _width_ and _height_, the proposal currently only considers the former. 

There is plenty of preexisting content that would allow to identify commonly used terms for breakpoints (as in the example above), so you would not need custom idents but could introduce keywords that authors could set to individual values then, without a need for `size()`:

~~~~ css
@size {
  small: 480px 640px;
  medium: 768px 576px;
  large: 1024px 720px;
  extra-large: 1440px 1080px;
}

@media (min-width: small) {
  /* Styles for small and above */
}

@media (width > medium) and (height < large) {
  /* Styles for medium to large */
}
~~~~


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


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

Received on Wednesday, 26 June 2024 13:27:08 UTC