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

isn't a valid CSS value - sass-loader can't parse font shorthand options that are 100% valid for css #459

Closed
wzup opened this issue May 18, 2017 · 2 comments

Comments

@wzup
Copy link

wzup commented May 18, 2017

Looks like sass-loader doesn't know how to parse this:

font: normal normal 400 16px/calc(16px * 1.4) Oxygen;

It is 100% valid value for css, but for some reason it is not valid for sass-loader.
It throws on 16px/calc(16px * 1.4) part:

ERROR in ./src/sass/globals.scss
    Module build failed: ModuleBuildError: Module build failed:
        font: normal normal 400 16px/calc(16px * 1.4) Oxygen;
                               ^
          16px/calc isn't a valid CSS value.
          in C:\Users\user\app\src\sass\globals.scss (line 15, column 29)
        at runLoaders (C:\Users\user\app\node_modules\webpack\lib\NormalModule.js:192:19)
        at C:\Users\user\app\node_modules\loader-runner\lib\LoaderRunner.js:364:11
        at C:\Users\user\app\node_modules\loader-runner\lib\LoaderRunner.js:230:18
        at context.callback (C:\Users\user\app\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
        at Object.asyncSassJobQueue.push [as callback] (C:\Users\user\app\node_modules\sass-loader\lib\loader.js:57:13)
        at Object.<anonymous> (C:\Users\user\app\node_modules\async\dist\async.js:2243:31)
        at Object.callback (C:\Users\user\app\node_modules\async\dist\async.js:906:16)
        at options.error (C:\Users\user\app\node_modules\node-sass\lib\index.js:294:32)
     @ ./src/js/App.js 6:14-37
     @ ./src/js/router.js
     @ ./src/js/browser.js

How to solve it? Is there some special syntax for it? Quotes don't work.

@wzup wzup changed the title sass-loader can't parse font shorthand options that are 100% valid for css isn't a valid CSS value - sass-loader can't parse font shorthand options that are 100% valid for css May 18, 2017
@alexander-akait
Copy link
Member

@wzup yep, it is valid css and it should be valid as scss (working on original sass compiler v4).
Problems in libsass (https://github.com/sass/libsass). We can not do anything here. Please create issue in libsass.

https://www.sassmeister.com/
Input:

a {
    font: normal normal 400 16px/calc(16px * 1.4) Roboto;
}

Output:

16px/calc isn't a valid CSS value. on line 2 at column 29

Thanks for helping us to do webpack better!

@alexander-akait
Copy link
Member

Fixed: sass/libsass#2392, let's wait new version node-sass with new version libsass. Thanks!

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