-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Applying on all pages when using @preprocessor stylus
#1819
Comments
It's a bug in stylus-lang |
@preprocessor stylus
Good to know, unfortunately it is abandoned, it has the most functions to use |
Try workarounds in this list and if none helps, try reporting the problem in https://github.com/stylus/stylus/issues/ |
Thanks, I will try |
For some reason this @-moz-document domain("example.com") {
@media (min-width: 10px) {
p {
color: #000
}
@media (min-height: 20px) {
p {
color: #fff
}
}
}
} compiles to @-moz-document domain("example.com") {
@media (min-width: 10px) {
p {
color: #000;
}
}
}
@media (min-width: 10px) and (min-height: 20px) {
p {
color: #fff;
}
} The easiest solution would be to not nest @-moz-document domain("example.com") {
@media (min-width: 10px) {
p {
color: #000
}
}
@media (min-width: 10px) and (min-height: 20px) {
p {
color: #fff
}
}
} I also noticed that more nesting "fixes" it :D @document domain("example.com") {
& {
@media (min-width: 10px) {
p {
color: #000
}
@media (min-height: 20px) {
p {
color: #fff
}
}
}
}
} |
Bug Report
Bug Description
When using the Stylus preprocessor with nested Media Queries, the styles are applied to all pages.
Screenshots
example.net:
example.com:
CSS Code
System Information
Additional Context
The text was updated successfully, but these errors were encountered: