Skip to content

Fix compile errors with Dart Sass #2867

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

Merged
merged 10 commits into from
Nov 9, 2018
Merged

Conversation

thisisdano
Copy link
Collaborator

This fixes two errors and one warning in Dart Sass compile:


Fixes an error where certain numbers couldn't be looked up in the number-to-token conversion table. The product of a mathematical operations (like (3 + 1)) would fail in the lookup but regular numbers like (4) would be OK. 🤷‍♀️ I fixed this by using strings like '4' for keys in the lookup instead of numbers, and converting the numbers to strings in the number-to-value() function.

I also renamed the fn number-to-token for clarity.


Fixes an error where colors (like red or transparent) passed into the color function messed up the string() function. Since raw colors like this shouldn't be passed into functions and mixins at all, I made this an explicit error and pointed the user to the documentation.

I changed the code in _banner.scss to use color('transparent') instead of color(transparent).


Rewrote some code to address the interpolation near operators warnings.

@thisisdano thisisdano requested a review from a team November 2, 2018 18:45
@thisisdano
Copy link
Collaborator Author

This all checks out on uswds-site. No new errors.

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.

1 participant