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

Is there a way to remove duplication of properties in the @media? #440

Open
cawa-93 opened this issue Sep 14, 2021 · 0 comments
Open

Is there a way to remove duplication of properties in the @media? #440

cawa-93 opened this issue Sep 14, 2021 · 0 comments

Comments

@cawa-93
Copy link

cawa-93 commented Sep 14, 2021

I would like to configure compiling of css with different theme configurations so as to avoid duplicating common properties.

Test case:

.foo {
    color: red;
    padding: 10px;
}

@media(prefers-color-scheme: dark) {
    .foo {
        color: tomato;
        padding: 10px;
    }
}

Actual output:

.foo {
    color: red;
    padding: 10px
}

@media (prefers-color-scheme:dark) {
    .foo {
        color: tomato;
        padding: 10px
    }
}

Expected output:

.foo {
    color: red;
    padding: 10px
}

@media (prefers-color-scheme:dark) {
    .foo {
        color: tomato;
        /* no more padding */
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants