Skip to content

Instantly share code, notes, and snippets.

@JeremyEnglert
Last active July 18, 2019 08:57
Show Gist options
  • Save JeremyEnglert/a48ef614dc4a193eb0a7c26d3376c13b to your computer and use it in GitHub Desktop.
Save JeremyEnglert/a48ef614dc4a193eb0a7c26d3376c13b to your computer and use it in GitHub Desktop.
Nesting custom CSS media queries
/* Input */
@custom-media --medium (min-width: 640px);
a {
color: red;
@media (--medium) {
color: green;
}
}
/* Output */
a {
color: red;
}
@media only screen and (min-width: 640px) {
a {
color: green
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment