MadLittleMods / postcss-css-variables

PostCSS plugin to transform CSS Custom Properties(CSS variables) syntax into a static representation
https://madlittlemods.github.io/postcss-css-variables/playground/
Other
536 stars 62 forks source link

Support for child combinator #7

Closed bangseongbeom closed 9 years ago

bangseongbeom commented 9 years ago

Current version supports only Descendant combinator(.sel1 .sel2). Child combinator(.sel1 > .sel2) should be also supported.

Input:

.a {
    --color: red;
}

.a > .b {
    color: var(--color);
}

Output:

.a > .b {
    color: undefined;
}

Expectation:

.a > .b {
    color: red;
}
MadLittleMods commented 9 years ago

Thank you for another great bug report @bangseongbeom!

I have added full support for the child combinator and direct-descendants.

I also added three tests to ensure we do not regress.