flickity icon indicating copy to clipboard operation
flickity copied to clipboard

SASS compiliation errors in latest version

Open sam98brown opened this issue 2 years ago • 7 comments

Hi

Upgrading to version 3 of the NPM package is causing issues in our project. I'm getting these SASS errors:

   ERROR in ./src/sass/main.scss (./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/sass/main.scss)
    Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
    SassError: Function hsl is missing argument $saturation.
            on line 7 of /Users/sambrown/Local Sites/obpmulti/app/public/wp-content/themes/ob/src/sass/main.scss
    >>   background: hsl(0 0% 20% / 100%);

Downgrading to v2.2.2 fixes it - it looks like those rules used to use hsla() instead of hsl(). Changing the rules to hsla() does fix it.

Any idea what's going wrong here?

sam98brown avatar Apr 05 '22 11:04 sam98brown

Must be a Sass issue.

I am using V1.50.1 (dart-sass) and everything works fine

hadl avatar May 11 '22 13:05 hadl

Guessing it's an issue with using node-sass rather than dart-sass

sam98brown avatar May 11 '22 14:05 sam98brown

@sam98brown this is indeed a Sass issue. You can workaround it by using interpolation for those values.

So instead of hsl(0 0% 20% / 100%), use: #{'hsl(0 0% 20% / 100%)'}

ConduciveMammal avatar May 19 '22 09:05 ConduciveMammal

Having this issue with Node-SASS. Just having to make my own version of the file as I can't see a workaround.

andrewhawkes avatar Jun 04 '22 16:06 andrewhawkes

@andrewhawkes see my comment above, that has a workaround using Interpolation.

ConduciveMammal avatar Jun 04 '22 18:06 ConduciveMammal

Thanks for reporting this issue. I'm going to revert the legacy format for hsl and hsla colors to resolve this issue.

desandro avatar Jan 16 '23 02:01 desandro

@sam98brown this is indeed a Sass issue. You can workaround it by using interpolation for those values.

So instead of hsl(0 0% 20% / 100%), use: #{'hsl(0 0% 20% / 100%)'}

This fixed the issue for me

everyonesbuddy avatar Jan 19 '23 18:01 everyonesbuddy