-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
use dart sass, and update related modules #10208
Conversation
2f5f85c
to
72d6875
Compare
72d6875
to
6826629
Compare
6826629
to
d14ec0c
Compare
Builds ready [d14ec0c]
Page Load Metrics (481 ± 64 ms)
|
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.
Seems legit
Do any of these differences affect us? |
The easiest way to tell might be to compare the .css output before and after this PR. |
@Gudahtt i'll do that, and report back -- i did do a number of things on the build presented by the bot in this PR to make sure there weren't glaring issues and nothing stuck out to me but I'll examine css output. |
the differences between the two files are plentiful, but they appear to be entirely changes in white space/formatting. Examples: before this change: .tab-bar__tab__caret {
display: none; }
@media screen and (max-width: 575px) {
.tab-bar__tab__caret {
display: block;
background-image: url("/images/caret-right.svg");
width: 36px;
height: 36px;
opacity: 0.5;
background-size: contain;
background-repeat: no-repeat;
background-position: center; }
[dir='rtl'] .tab-bar__tab__caret {
-webkit-transform: rotate(180deg);
transform: rotate(180deg); } }
.transaction-activity-log__activity::after {
content: '';
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 7px;
border-right: 1px solid #909090; } after this change: .tab-bar__tab__caret {
display: none;
}
@media screen and (max-width: 575px) {
.tab-bar__tab__caret {
display: block;
background-image: url("/images/caret-right.svg");
width: 36px;
height: 36px;
opacity: 0.5;
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
[dir=rtl] .tab-bar__tab__caret {
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
}
}
.transaction-activity-log__activity::after {
content: "";
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 7px;
border-right: 1px solid #909090;
} The only differences that concerned me were these: .fa-stopwatch:before {
content: "\f2f2"; } .fa-stopwatch:before {
content: "";
} which after researching I found sass/dart-sass#568 -- I also double checked and the font-awesome fonts are still working on storybook and the extension. |
Rationale
At some point in the future, I would like to refactor the way we use our scss files to make use of the
@use
rule. switching fromnode-sass
tosass
is a requirement of doing that, becausenode-sass
binds tolibsass
which hasn't received new language features since November 2018. The official implementation of sass isdart-sass
which has js bindings through thesass
dependency.More short-termed: I have need of the
math.pow
function that was added officially to themath
module but never landed inlibsass
This PR
node-sass
dependency (gulp-sass still depends on it and it must be compiled in prep-deps on circleci).sass
(js bindings todart-sass
)adds fibers, which is recommended by bothdespite this recommendation, thegulp-sass
andsass-loader
for improving performance during compilation.fibers
package is marked as deprecated and heavily discouraged from use. Furthermore, it didn't appear to do anything in terms of performance on the build. I removed this complexity from the PR.sass-loader
sass
as implementation tosass-loader
design-system/index.scss
for@forward
its contents,which should have zero impact on the final result(1). However, ifnode-sass
was still being used it would fail to compile.@forward
doesn't forward maps? I'm not sure what happened there but in a future PR where I used$color-map
fromdesing-system/colors
it didn't work until I@use
'd colors directly. This isn't blocking this PR because$color-map
is not used yet.