-
Notifications
You must be signed in to change notification settings - Fork 2.1k
refactor: migrate to the Sass module system #5453
refactor: migrate to the Sass module system #5453
Conversation
One other note about the script used here: while the underlying Sass migrator is fairly robust, the script itself is fragile, as preserving the proper prefixes for some of the more complex components (e.g. mdc-ripple, mdc-select, mdc-textfield) required a bunch of |
Codecov Report
@@ Coverage Diff @@
## master #5453 +/- ##
==========================================
- Coverage 97.06% 97.04% -0.02%
==========================================
Files 164 164
Lines 6266 6266
Branches 824 782 -42
==========================================
- Hits 6082 6081 -1
- Misses 184 185 +1
Continue to review full report at Codecov.
|
62c6d7c
to
5593f9f
Compare
Okay, the lint issue was that stylelint-scss was out of date. The unit tests seem to be failing because of an issue with Chrome |
5593f9f
to
4142d1a
Compare
4142d1a
to
a19bf66
Compare
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.
🎉
This PR was generated by running this script based on the Sass migrator. It migrates all components to the Sass module system, removing manual
mdc-$component
prefixes and implicit dependencies between files (though still leaving both intact for users still using@import
).High-level overview of the changes made here:
mdc-button-
) for each component have been removed from all variables, functions, and mixins within the code. Prefixes on CSS selectors are unaffected.@use
, only members directly declared in that file are available. Themdc-$component.scss
files should only expose CSS, not Sass members.@import
previously, so existing users that still use@import
shouldn't break as a result of these changes. These files will then be used by the migrator when those users later migrate to the module system themselves.mdc-text-field-
prefix when depended on via@import
. None of the variables are used within Google and the mixin (formerlymdc-required-text-field-label-asterisk_
, nowrequired-label-asterisk_
) is used only once by MWC.