CSS media queries can be nested (#tilPost)

I read a post on Bramus’ blog (which you should check out), and I learned that CSS media queries could be nested. ?
The following is completely valid CSS:
@media not print {
@media (min-width: 0) {
p {
font-weight: bold;…


This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis

I read a post on Bramus' blog (which you should check out), and I learned that CSS media queries could be nested. ?

The following is completely valid CSS:

@media not print {
  @media (min-width: 0) {
    p {
      font-weight: bold;
    }
    @media (max-width: 750px) {
      p {
        background: yellow;
      }
    }
  }
}

If you want to learn more about this functionality, read the article "Nested Media Queries" on bram.us.


Reply to Stefan


This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis


Print Share Comment Cite Upload Translate
APA
Stefan Judis | Sciencx (2022-12-09T05:43:54+00:00) » CSS media queries can be nested (#tilPost). Retrieved from https://www.scien.cx/2021/01/22/css-media-queries-can-be-nested-tilpost/.
MLA
" » CSS media queries can be nested (#tilPost)." Stefan Judis | Sciencx - Friday January 22, 2021, https://www.scien.cx/2021/01/22/css-media-queries-can-be-nested-tilpost/
HARVARD
Stefan Judis | Sciencx Friday January 22, 2021 » CSS media queries can be nested (#tilPost)., viewed 2022-12-09T05:43:54+00:00,<https://www.scien.cx/2021/01/22/css-media-queries-can-be-nested-tilpost/>
VANCOUVER
Stefan Judis | Sciencx - » CSS media queries can be nested (#tilPost). [Internet]. [Accessed 2022-12-09T05:43:54+00:00]. Available from: https://www.scien.cx/2021/01/22/css-media-queries-can-be-nested-tilpost/
CHICAGO
" » CSS media queries can be nested (#tilPost)." Stefan Judis | Sciencx - Accessed 2022-12-09T05:43:54+00:00. https://www.scien.cx/2021/01/22/css-media-queries-can-be-nested-tilpost/
IEEE
" » CSS media queries can be nested (#tilPost)." Stefan Judis | Sciencx [Online]. Available: https://www.scien.cx/2021/01/22/css-media-queries-can-be-nested-tilpost/. [Accessed: 2022-12-09T05:43:54+00:00]
rf:citation
» CSS media queries can be nested (#tilPost) | Stefan Judis | Sciencx | https://www.scien.cx/2021/01/22/css-media-queries-can-be-nested-tilpost/ | 2022-12-09T05:43:54+00:00
https://github.com/addpipe/simple-recorderjs-demo