-
Notifications
You must be signed in to change notification settings - Fork 44
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
RSTUDIO-538: Switch to the sass library #1654
Conversation
@@ -70,7 +70,7 @@ | |||
top: -$spacer; | |||
|
|||
&__Btn { | |||
margin: 0 ($spacer / 4); | |||
margin: 0 (calc($spacer / 4)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using calc makes this compute when evaluating the CSS rather than when compiling the SASS and adds verbosity. What's the context on these changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's related to this: https://sass-lang.com/documentation/breaking-changes/slash-div/
math.div
may be a more equivalent change, it's just required imports.
Actually this let me notice that they have an automatic migrator, so I could run that and see what the output is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sass
does actually simplify calc
expressions to a single number in most cases as well although it's a bit different from plain /
@@ -70,7 +70,7 @@ | |||
top: -$spacer; | |||
|
|||
&__Btn { | |||
margin: 0 ($spacer / 4); | |||
margin: 0 ($spacer * 0.25); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly enough, this is what the sass migrator tool does for this: https://github.com/sass/migrator#readme. Seems like the way to go
@kraenhansen It is a lot less verbose now, what do you think?
Changes the deprecated
node-sass
dependency and uses https://github.com/sass/migrator#readme to mitigate warnings from the migration, namely: https://sass-lang.com/documentation/breaking-changes/slash-div/Resolves #1652