-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Description
I've been working closely with @media queries for a new version of the 1KB CSS Grid that will be written in LESS.js, but I have noticed two crucial inconsistencies in how @media queries are currently being handled:
You shouldn't need to define a selector within a media query, but should be able to specify CSS attributes directly. For instance:
header {
width: 50%;
@media (max-width: 720px) {
width: 100%;
}
}
Secondly, @media queries in LESS.js should be aware of their position within other nested rules. For example:
article {
header {
width: 50%;
@media (max-width: 720px) {
&:hover {
width: 100%;
}
}
}
}
Should result in:
article header:hover { width: 100%; }
But unfortunately, it currently results in:
header:hover { width: 100%; }
I am more than happy to be a champion for @media query support in LESS, so please let me know if there's anything else I can do to help!
Metadata
Metadata
Assignees
Labels
No labels