Skip to content
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

Nested media queries are malformed #4

Closed
ryan-alan opened this issue Sep 23, 2022 · 3 comments
Closed

Nested media queries are malformed #4

ryan-alan opened this issue Sep 23, 2022 · 3 comments

Comments

@ryan-alan
Copy link

When media queries are nested in parent selectors, the resulting code is malformed and breaks pre-processed style sheets. See below.

/* original */

.test1 {
    width: 100%;
    color: red;

    @media screen and (min-width: 768px) {
        color: blue;
    }
}

/* alphabetized - does not work correctly with nested media queries */

.test1 {
    color: red;
    min-width: 768px) {
        color: blue;
    }
    width: 100%;
    
    @media screen and (
}

/* original */

.test2 {
    width: 100%;
    color: red;
}

@media screen and (min-width: 768px) {
    .test2 {
        color: blue;
    }
}

/* alphabetized - works fine with separate media queries */

.test2 {
    color: red;
    width: 100%;
}

@media screen and (min-width: 768px) {
    
    .test2 {
        color: blue;
    }
}
@mattkenefick
Copy link
Owner

Ack. I'll look into.

@mattkenefick
Copy link
Owner

Should be resolved in 0.3.0

@ryan-alan
Copy link
Author

Thank you, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants