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

calc containing variable with fallback not correctly compiled. #81

Closed
renestalder opened this issue Aug 29, 2018 · 1 comment
Closed

Comments

@renestalder
Copy link

I have many of following lines in my code:

.klt-p-block-team-list__item:first-child {
    margin-top: calc(var(--klt-l-spacing-3, 0) * -1);
}

The build fails in this case.

    ERROR in ./~/css-loader?{"importLoaders":1,"minimize":true}!./~/postcss-loader/lib?{}!./dev/patternlib/source/css/klt-ui.css
    Module build failed: Unclosed bracket (2972:21)
    
      2970 | }
      2971 | .klt-p-block-team-list__item:first-child {
    > 2972 |     margin-top: calc(20px;
           |                     ^
      2973 | }

Seems like postcss-css-variables generates this output:

.klt-p-block-team-list__item:first-child {
    margin-top: calc(20px;
}

It seems like to pass and compile correctly when removing the fallback variable from var().

@renestalder renestalder changed the title calc containing variable with fallback not correctly combiled. calc containing variable with fallback not correctly compiled. Aug 29, 2018
@MadLittleMods
Copy link
Owner

Duplicate of #62

@MadLittleMods MadLittleMods marked this as a duplicate of #62 Sep 4, 2018
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