Skip to content

Fix compile errors with Dart Sass#2867

Merged
thisisdano merged 10 commits intorelease-2.0from
dw-dart-sass-errors
Nov 9, 2018
Merged

Fix compile errors with Dart Sass#2867
thisisdano merged 10 commits intorelease-2.0from
dw-dart-sass-errors

Conversation

@thisisdano
Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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