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

[node-build-scripts] fix(generate-css-variables): LibSass compat #5246

Merged

Conversation

pgoldberg
Copy link
Contributor

@pgoldberg pgoldberg commented Apr 7, 2022

Fixes #5244

Uses get-sass-vars for scss variable generation as well as less generation

Checklist

  • Includes tests
  • Update documentation

Changes proposed in this pull request:

Reviewers should focus on:

Screenshot

@pgoldberg pgoldberg force-pushed the pgoldberg/fixScssVariableOutput branch from eb75a1f to 575f902 Compare April 7, 2022 18:14
adidahiya
adidahiya previously approved these changes Apr 7, 2022
}
variablesScss = [COPYRIGHT_HEADER, USE_MATH_RULE, variablesScss].join("\n");
cleanedInput = [USE_MATH_RULE, cleanedInput].join("\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for the USE_MATH_RULE now, we can remove that constant completely

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is actually needed here so it can properly run through getSassVars (which compiles with sass, so without it, it wouldn't know how to resolve math.divs). When it goes through generateScssVariables there's no outputted @use "sass:math"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wait, I guess we need this to compute the values... sorry, disregard

@adidahiya adidahiya dismissed their stale review April 7, 2022 18:16

I mean to 👎

Copy link
Contributor

@adidahiya adidahiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, I verified the variables.scss and variables.less output locally

@adidahiya adidahiya changed the title fix scss variable output for libsass compatibility [node-build-scripts] fix(generate-css-variables): LibSass compatibility Apr 7, 2022
@adidahiya adidahiya changed the title [node-build-scripts] fix(generate-css-variables): LibSass compatibility [node-build-scripts] fix(generate-css-variables): LibSass compat Apr 7, 2022
@adidahiya adidahiya merged commit 4b6a09a into palantir:develop Apr 7, 2022
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

Successfully merging this pull request may close these issues.

variables.scss is incompatible with node-sass
2 participants