BlessCSS / bless

CSS Post-Processor
blesscss.com
MIT License
282 stars 60 forks source link

Nested Media Queries Compile Incorrectly #84

Closed JoshuaSoileau closed 8 years ago

JoshuaSoileau commented 8 years ago

Hey guys, I ran into an edge case where the compiler fails.

If we have nested media queries, the compiler deletes one of them.

input.css:

@media only screen and (max-width: 599px) {
    .cart-table colgroup, .cart-table thead {
        display: none;
    }

    @media only screen and (max-width: 399px) {
        .cart-table colgroup, .cart-table thead {
            display: block;
        }
    }
}

Becomes

.cart-table colgroup, .cart-table thead {
    display: none;
}

@media only screen and (max-width: 399px) {
    .cart-table colgroup, .cart-table thead {
        display: block;
    }
}
paulyoung commented 8 years ago

@JoshuaSoileau could you confirm which version you're using?

JoshuaSoileau commented 8 years ago

@paulyoung Sure, I'm using blessc 3.0.3

aabenoja commented 8 years ago

@JoshuaSoileau Try using our v4.0.0-alpha.0 and see if that works

paulyoung commented 8 years ago

@JoshuaSoileau I'm going to close this one but please let us know if you had any issues with v4.