Open zenstorage opened 2 months ago
It's a bug in stylus-lang @preprocessor
. Its development is apparently abandoned and it has so many bugs that I wonder if we should remove it altogether...
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 @media
@-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