From 81809c4d6edec6d3d1ca6c34fb47c7e4de5f0c2d Mon Sep 17 00:00:00 2001 From: Jennifer Thakar Date: Wed, 8 Jan 2020 10:54:32 -0800 Subject: [PATCH] Fix or remove lints --- .stylelintrc.yaml | 14 +++----- package.json | 2 +- packages/mdc-button/mdc-button.scss | 2 -- packages/mdc-card/mdc-card.scss | 2 -- packages/mdc-checkbox/mdc-checkbox.scss | 2 -- packages/mdc-chips/_mixins.scss | 6 +++- packages/mdc-chips/_variables.scss | 6 +++- packages/mdc-chips/chip-set/mdc-chip-set.scss | 2 -- packages/mdc-chips/chip/mdc-chip.scss | 2 -- packages/mdc-data-table/mdc-data-table.scss | 2 -- packages/mdc-dialog/mdc-dialog.scss | 2 -- packages/mdc-drawer/common.scss | 2 -- .../dismissible/mdc-drawer-dismissible.scss | 2 -- .../mdc-drawer/modal/mdc-drawer-modal.scss | 2 -- packages/mdc-elevation/_mixins.scss | 14 ++++++-- packages/mdc-elevation/common.scss | 2 -- packages/mdc-elevation/mdc-elevation.scss | 2 -- packages/mdc-fab/mdc-fab.scss | 2 -- .../mdc-floating-label.scss | 1 - packages/mdc-form-field/mdc-form-field.scss | 2 -- packages/mdc-grid-list/mdc-grid-list.scss | 2 -- packages/mdc-icon-button/_mixins.scss | 7 +++- packages/mdc-icon-button/mdc-icon-button.scss | 2 -- packages/mdc-image-list/mdc-image-list.scss | 2 -- packages/mdc-layout-grid/mdc-layout-grid.scss | 1 - packages/mdc-line-ripple/mdc-line-ripple.scss | 1 - .../mdc-linear-progress.scss | 2 -- packages/mdc-list/mdc-list.scss | 2 -- .../mdc-menu-surface/mdc-menu-surface.scss | 2 -- packages/mdc-menu/mdc-menu.scss | 2 -- .../mdc-notched-outline.scss | 1 - packages/mdc-radio/mdc-radio.scss | 2 -- packages/mdc-ripple/_mixins.scss | 6 +++- packages/mdc-ripple/common.scss | 1 - packages/mdc-ripple/mdc-ripple.scss | 1 - packages/mdc-select/_mixins.scss | 15 ++++++-- .../helper-text/mdc-select-helper-text.scss | 1 - packages/mdc-select/icon/_mixins.scss | 6 +++- packages/mdc-select/icon/mdc-select-icon.scss | 1 - packages/mdc-select/mdc-select.scss | 1 - packages/mdc-slider/mdc-slider.scss | 2 -- packages/mdc-snackbar/mdc-snackbar.scss | 2 -- packages/mdc-switch/mdc-switch.scss | 2 -- packages/mdc-tab-bar/mdc-tab-bar.scss | 2 -- .../mdc-tab-indicator/mdc-tab-indicator.scss | 2 -- .../mdc-tab-scroller/mdc-tab-scroller.scss | 2 -- packages/mdc-tab/mdc-tab.scss | 2 -- packages/mdc-textfield/_mixins.scss | 35 +++++++++++++++---- packages/mdc-textfield/_variables.scss | 6 +++- .../mdc-text-field-helper-text.scss | 1 - .../icon/mdc-text-field-icon.scss | 1 - packages/mdc-textfield/mdc-text-field.scss | 1 - packages/mdc-theme/mdc-theme.scss | 2 -- packages/mdc-top-app-bar/mdc-top-app-bar.scss | 1 - .../mdc-touch-target/mdc-touch-target.scss | 2 -- packages/mdc-typography/mdc-typography.scss | 2 -- 56 files changed, 89 insertions(+), 105 deletions(-) diff --git a/.stylelintrc.yaml b/.stylelintrc.yaml index f6d8c8d3ae9..40f447636ab 100644 --- a/.stylelintrc.yaml +++ b/.stylelintrc.yaml @@ -5,7 +5,9 @@ plugins: - stylelint-order rules: # Wrap lines greater than 120 characters - max-line-length: 120 + max-line-length: + - 120 + - ignorePattern: '/^@forward ".*"( as mdc-.*)? hide/' # Override stylelint-config-standard - we only use CSS comments for annotations that don't warrant an empty line comment-empty-line-before: null # Follow best practices @@ -236,11 +238,13 @@ rules: - else - error - for + - forward - function - include - if - mixin - return + - use - warn # Disallow "@extend" in scss. # http://csswizardry.com/2016/02/mixins-better-for-performance/ @@ -313,14 +317,6 @@ rules: - ^fieldset - ^\[aria\-disabled=(?:.+)\] - # SCSS naming patterns, just like our CSS conventions above. - # (note for $-vars we use a leading underscore for "private" variables) - scss/dollar-variable-pattern: - - ^_?mdc-.+ - - - ignore: local - scss/at-function-pattern: ^mdc-.+ - scss/at-mixin-pattern: ^mdc-.+ # Prevents unneeded nesting selectors scss/selector-no-redundant-nesting-selector: true # Since leading underscores are not needed, they can be omitted diff --git a/package.json b/package.json index 702ab392ef2..a906eeb6e4b 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "cross-env": "^5.0.0", "css-loader": "^2.0.0", "cssom": "^0.3.2", - "dart-sass": "^1.15.2", + "dart-sass": "^1.24.3", "debounce": "^1.1.0", "del": "^4.0.0", "detect-port": "^1.2.3", diff --git a/packages/mdc-button/mdc-button.scss b/packages/mdc-button/mdc-button.scss index 49bfe6e6dff..35bcb65797b 100644 --- a/packages/mdc-button/mdc-button.scss +++ b/packages/mdc-button/mdc-button.scss @@ -21,9 +21,7 @@ // @use "./mixins"; - @forward "mixins"; @forward "variables"; - @include mixins.core-styles; @include mixins.theme-baseline; diff --git a/packages/mdc-card/mdc-card.scss b/packages/mdc-card/mdc-card.scss index 0bd309cfc34..582e8319dcb 100644 --- a/packages/mdc-card/mdc-card.scss +++ b/packages/mdc-card/mdc-card.scss @@ -21,8 +21,6 @@ // @use "./mixins"; - @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-checkbox/mdc-checkbox.scss b/packages/mdc-checkbox/mdc-checkbox.scss index 2458505f2ec..99e25686abe 100644 --- a/packages/mdc-checkbox/mdc-checkbox.scss +++ b/packages/mdc-checkbox/mdc-checkbox.scss @@ -21,10 +21,8 @@ // @use "./mixins"; - @forward "functions"; @forward "keyframes"; @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-chips/_mixins.scss b/packages/mdc-chips/_mixins.scss index 3020fea1951..d899f62cc47 100644 --- a/packages/mdc-chips/_mixins.scss +++ b/packages/mdc-chips/_mixins.scss @@ -468,7 +468,11 @@ $ripple-target: ".mdc-chip__ripple"; } } -@mixin outline-width($width, $horizontal-padding: variables.$horizontal-padding, $query: feature-targeting-functions.all()) { +@mixin outline-width( + $width, + $horizontal-padding: variables.$horizontal-padding, + $query: feature-targeting-functions.all() +) { $feat-structure: feature-targeting-functions.create-target($query, structure); // Note: Adjust padding to maintain consistent width with non-outlined chips diff --git a/packages/mdc-chips/_variables.scss b/packages/mdc-chips/_variables.scss index cb2b332e3f9..e897eaee344 100644 --- a/packages/mdc-chips/_variables.scss +++ b/packages/mdc-chips/_variables.scss @@ -25,7 +25,11 @@ @use "@material/density/variables" as density-variables; @use "@material/theme/variables" as theme-variables; -$fill-color-default: color.mix(theme-variables.prop-value(on-surface), theme-variables.prop-value(surface), 12%) !default; +$fill-color-default: color.mix( + theme-variables.prop-value(on-surface), + theme-variables.prop-value(surface), + 12% +) !default; $ink-color-default: rgba(theme-variables.prop-value(on-surface), .87) !default; $horizontal-padding: 12px !default; $height: 32px !default; diff --git a/packages/mdc-chips/chip-set/mdc-chip-set.scss b/packages/mdc-chips/chip-set/mdc-chip-set.scss index 104c3f22f3c..38518c56042 100644 --- a/packages/mdc-chips/chip-set/mdc-chip-set.scss +++ b/packages/mdc-chips/chip-set/mdc-chip-set.scss @@ -21,8 +21,6 @@ // @use "../mixins"; - @forward "../mixins"; @forward "../variables"; - @include mixins.set-core-styles; diff --git a/packages/mdc-chips/chip/mdc-chip.scss b/packages/mdc-chips/chip/mdc-chip.scss index 1c5bbca2f64..556f80d6fdc 100644 --- a/packages/mdc-chips/chip/mdc-chip.scss +++ b/packages/mdc-chips/chip/mdc-chip.scss @@ -21,8 +21,6 @@ // @use "../mixins"; - @forward "../mixins"; @forward "../variables"; - @include mixins.core-styles; diff --git a/packages/mdc-data-table/mdc-data-table.scss b/packages/mdc-data-table/mdc-data-table.scss index d356210c8f0..48af7bb7b2d 100644 --- a/packages/mdc-data-table/mdc-data-table.scss +++ b/packages/mdc-data-table/mdc-data-table.scss @@ -21,9 +21,7 @@ // @use "./mixins"; - @forward "mixins"; @forward "variables"; - @include mixins.core-styles; @include mixins.theme-baseline; diff --git a/packages/mdc-dialog/mdc-dialog.scss b/packages/mdc-dialog/mdc-dialog.scss index 85a26fc9e26..b7b2b7730c2 100644 --- a/packages/mdc-dialog/mdc-dialog.scss +++ b/packages/mdc-dialog/mdc-dialog.scss @@ -21,8 +21,6 @@ // @use "./mixins"; - @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-drawer/common.scss b/packages/mdc-drawer/common.scss index cbdef47184d..46a36f6b7eb 100644 --- a/packages/mdc-drawer/common.scss +++ b/packages/mdc-drawer/common.scss @@ -21,8 +21,6 @@ // @use "./mixins"; - @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-drawer/dismissible/mdc-drawer-dismissible.scss b/packages/mdc-drawer/dismissible/mdc-drawer-dismissible.scss index d1e3c64a54f..cef71753341 100644 --- a/packages/mdc-drawer/dismissible/mdc-drawer-dismissible.scss +++ b/packages/mdc-drawer/dismissible/mdc-drawer-dismissible.scss @@ -21,8 +21,6 @@ // @use "../mixins"; - @forward "../mixins"; @forward "../variables"; - @include mixins.dismissible-core-styles; diff --git a/packages/mdc-drawer/modal/mdc-drawer-modal.scss b/packages/mdc-drawer/modal/mdc-drawer-modal.scss index ab4dede8838..dd5300beee2 100644 --- a/packages/mdc-drawer/modal/mdc-drawer-modal.scss +++ b/packages/mdc-drawer/modal/mdc-drawer-modal.scss @@ -21,8 +21,6 @@ // @use "../mixins"; - @forward "../mixins"; @forward "../variables"; - @include mixins.modal-core-styles; diff --git a/packages/mdc-elevation/_mixins.scss b/packages/mdc-elevation/_mixins.scss index 9e2a9d688ee..fbd2a6e0c14 100644 --- a/packages/mdc-elevation/_mixins.scss +++ b/packages/mdc-elevation/_mixins.scss @@ -114,7 +114,12 @@ /// @param {Number} [$height] - The height of the elevation overlay /// @param {Boolean} [$has-content-sizing] - Set to false if the container has no content sizing /// -@mixin overlay-dimensions($width, $height: $width, $has-content-sizing: true, $query: feature-targeting-functions.all()) { +@mixin overlay-dimensions( + $width, + $height: $width, + $has-content-sizing: true, + $query: feature-targeting-functions.all() +) { $feat-structure: feature-targeting-functions.create-target($query, structure); @include overlay-selector_ { @@ -170,7 +175,12 @@ // The $z-value must be between 0 and 24. // If $color has an alpha channel, it will be ignored and overridden. To increase the opacity of the shadow, use // $opacity-boost. -@mixin elevation($z-value, $color: variables.$baseline-color, $opacity-boost: 0, $query: feature-targeting-functions.all()) { +@mixin elevation( + $z-value, + $color: variables.$baseline-color, + $opacity-boost: 0, + $query: feature-targeting-functions.all() +) { @if meta.type-of($z-value) != number or not math.is-unitless($z-value) { @error "$z-value must be a unitless number, but received '#{$z-value}'"; } diff --git a/packages/mdc-elevation/common.scss b/packages/mdc-elevation/common.scss index ec51264b6a5..7eababdc168 100644 --- a/packages/mdc-elevation/common.scss +++ b/packages/mdc-elevation/common.scss @@ -21,9 +21,7 @@ // @use "./mixins"; - @forward "functions"; @forward "mixins" hide elevation; @forward "variables"; - @include mixins.overlay-common; diff --git a/packages/mdc-elevation/mdc-elevation.scss b/packages/mdc-elevation/mdc-elevation.scss index 98daf5a1bf8..0281d527d6d 100644 --- a/packages/mdc-elevation/mdc-elevation.scss +++ b/packages/mdc-elevation/mdc-elevation.scss @@ -21,9 +21,7 @@ // @use "./mixins"; - @forward "functions"; @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-fab/mdc-fab.scss b/packages/mdc-fab/mdc-fab.scss index a386812d4c6..585b6e9dfe6 100644 --- a/packages/mdc-fab/mdc-fab.scss +++ b/packages/mdc-fab/mdc-fab.scss @@ -19,8 +19,6 @@ // THE SOFTWARE. @use "./mixins"; - @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-floating-label/mdc-floating-label.scss b/packages/mdc-floating-label/mdc-floating-label.scss index 884da5475d3..f8bd437d790 100644 --- a/packages/mdc-floating-label/mdc-floating-label.scss +++ b/packages/mdc-floating-label/mdc-floating-label.scss @@ -22,7 +22,6 @@ @use "@material/base/mixins" as base-mixins; @use "./mixins"; - @forward "mixins"; @forward "variables"; diff --git a/packages/mdc-form-field/mdc-form-field.scss b/packages/mdc-form-field/mdc-form-field.scss index 85a26fc9e26..b7b2b7730c2 100644 --- a/packages/mdc-form-field/mdc-form-field.scss +++ b/packages/mdc-form-field/mdc-form-field.scss @@ -21,8 +21,6 @@ // @use "./mixins"; - @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-grid-list/mdc-grid-list.scss b/packages/mdc-grid-list/mdc-grid-list.scss index 85a26fc9e26..b7b2b7730c2 100644 --- a/packages/mdc-grid-list/mdc-grid-list.scss +++ b/packages/mdc-grid-list/mdc-grid-list.scss @@ -21,8 +21,6 @@ // @use "./mixins"; - @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-icon-button/_mixins.scss b/packages/mdc-icon-button/_mixins.scss index 508a0379097..b1c8e37a86e 100644 --- a/packages/mdc-icon-button/_mixins.scss +++ b/packages/mdc-icon-button/_mixins.scss @@ -125,7 +125,12 @@ /// This mixin provides too much of low level customization. /// Please use mdc-icon-button-size instead. /// -@mixin icon-size($width, $height: $width, $padding: math.max($width,$height)/2, $query: feature-targeting-functions.all()) { +@mixin icon-size( + $width, + $height: $width, + $padding: math.max($width,$height)/2, + $query: feature-targeting-functions.all() +) { $feat-structure: feature-targeting-functions.create-target($query, structure); @include feature-targeting-mixins.targets($feat-structure) { diff --git a/packages/mdc-icon-button/mdc-icon-button.scss b/packages/mdc-icon-button/mdc-icon-button.scss index cbdef47184d..46a36f6b7eb 100644 --- a/packages/mdc-icon-button/mdc-icon-button.scss +++ b/packages/mdc-icon-button/mdc-icon-button.scss @@ -21,8 +21,6 @@ // @use "./mixins"; - @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-image-list/mdc-image-list.scss b/packages/mdc-image-list/mdc-image-list.scss index b96f566aaab..910d5891cf9 100644 --- a/packages/mdc-image-list/mdc-image-list.scss +++ b/packages/mdc-image-list/mdc-image-list.scss @@ -19,8 +19,6 @@ // THE SOFTWARE. @use "./mixins"; - @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-layout-grid/mdc-layout-grid.scss b/packages/mdc-layout-grid/mdc-layout-grid.scss index 3625f7fe8b4..c9d56770ede 100644 --- a/packages/mdc-layout-grid/mdc-layout-grid.scss +++ b/packages/mdc-layout-grid/mdc-layout-grid.scss @@ -22,7 +22,6 @@ @use "sass:map"; @use "./variables"; @use "./mixins"; - @forward "mixins"; @forward "variables"; diff --git a/packages/mdc-line-ripple/mdc-line-ripple.scss b/packages/mdc-line-ripple/mdc-line-ripple.scss index 2e333ec1ec6..5790c41a75b 100644 --- a/packages/mdc-line-ripple/mdc-line-ripple.scss +++ b/packages/mdc-line-ripple/mdc-line-ripple.scss @@ -22,7 +22,6 @@ @use "@material/base/mixins" as base-mixins; @use "./mixins"; - @forward "functions"; @forward "mixins"; diff --git a/packages/mdc-linear-progress/mdc-linear-progress.scss b/packages/mdc-linear-progress/mdc-linear-progress.scss index 91bf2c7eacd..3ff80bebd97 100644 --- a/packages/mdc-linear-progress/mdc-linear-progress.scss +++ b/packages/mdc-linear-progress/mdc-linear-progress.scss @@ -19,9 +19,7 @@ // THE SOFTWARE. @use "./mixins"; - @forward "keyframes"; @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-list/mdc-list.scss b/packages/mdc-list/mdc-list.scss index a386812d4c6..585b6e9dfe6 100644 --- a/packages/mdc-list/mdc-list.scss +++ b/packages/mdc-list/mdc-list.scss @@ -19,8 +19,6 @@ // THE SOFTWARE. @use "./mixins"; - @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-menu-surface/mdc-menu-surface.scss b/packages/mdc-menu-surface/mdc-menu-surface.scss index cbdef47184d..46a36f6b7eb 100644 --- a/packages/mdc-menu-surface/mdc-menu-surface.scss +++ b/packages/mdc-menu-surface/mdc-menu-surface.scss @@ -21,8 +21,6 @@ // @use "./mixins"; - @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-menu/mdc-menu.scss b/packages/mdc-menu/mdc-menu.scss index 85a26fc9e26..b7b2b7730c2 100644 --- a/packages/mdc-menu/mdc-menu.scss +++ b/packages/mdc-menu/mdc-menu.scss @@ -21,8 +21,6 @@ // @use "./mixins"; - @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-notched-outline/mdc-notched-outline.scss b/packages/mdc-notched-outline/mdc-notched-outline.scss index fb055bf2297..5b662ab8721 100644 --- a/packages/mdc-notched-outline/mdc-notched-outline.scss +++ b/packages/mdc-notched-outline/mdc-notched-outline.scss @@ -22,7 +22,6 @@ @use "@material/base/mixins" as base-mixins; @use "./mixins"; - @forward "mixins"; @forward "variables"; diff --git a/packages/mdc-radio/mdc-radio.scss b/packages/mdc-radio/mdc-radio.scss index fe51c7d0b31..23dac598527 100644 --- a/packages/mdc-radio/mdc-radio.scss +++ b/packages/mdc-radio/mdc-radio.scss @@ -21,9 +21,7 @@ // @use "./mixins"; - @forward "functions"; @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-ripple/_mixins.scss b/packages/mdc-ripple/_mixins.scss index 5ebf724d8cb..58af5f4183f 100644 --- a/packages/mdc-ripple/_mixins.scss +++ b/packages/mdc-ripple/_mixins.scss @@ -199,7 +199,11 @@ /// @param {map} $opacity-map - map specifying custom opacity of zero or more states /// @param {bool} $has-nested-focusable-element - whether the component contains a focusable element in the root /// -@mixin states-opacities($opacity-map: (), $has-nested-focusable-element: false, $query: feature-targeting-functions.all()) { +@mixin states-opacities( + $opacity-map: (), + $has-nested-focusable-element: false, + $query: feature-targeting-functions.all() +) { // Ensure sufficient specificity to override base state opacities @if map.has-key($opacity-map, hover) { @include states-hover-opacity(map.get($opacity-map, hover), $query: $query); diff --git a/packages/mdc-ripple/common.scss b/packages/mdc-ripple/common.scss index 0a434fb796b..4a69442e39a 100644 --- a/packages/mdc-ripple/common.scss +++ b/packages/mdc-ripple/common.scss @@ -24,6 +24,5 @@ @forward "keyframes"; @forward "mixins"; @forward "variables"; - @use "./mixins"; @include mixins.common; diff --git a/packages/mdc-ripple/mdc-ripple.scss b/packages/mdc-ripple/mdc-ripple.scss index d69bdc3fc19..f1afe3206c5 100644 --- a/packages/mdc-ripple/mdc-ripple.scss +++ b/packages/mdc-ripple/mdc-ripple.scss @@ -24,7 +24,6 @@ @forward "keyframes"; @forward "mixins"; @forward "variables"; - @use "./mixins"; @include mixins.common; @include mixins.core-styles; diff --git a/packages/mdc-select/_mixins.scss b/packages/mdc-select/_mixins.scss index 28f43930a44..b37f1033ab1 100644 --- a/packages/mdc-select/_mixins.scss +++ b/packages/mdc-select/_mixins.scss @@ -108,7 +108,10 @@ $masked-radius: functions.mask-radius($radius, 1 1 0 0); .mdc-select__anchor { - @include shape-mixins.radius(functions.resolve-percentage-radius(variables.$height, $masked-radius), $rtl-reflexive); + @include shape-mixins.radius( + functions.resolve-percentage-radius(variables.$height, $masked-radius), + $rtl-reflexive + ); } } @@ -248,10 +251,16 @@ &.mdc-select--with-leading-icon { .mdc-floating-label { - @include rtl-mixins.reflexive-position(left, variables.$icon-padding - notched-outline-variables.$leading-width); + @include rtl-mixins.reflexive-position( + left, + variables.$icon-padding - notched-outline-variables.$leading-width + ); &--float-above { - @include rtl-mixins.reflexive-position(left, variables.$icon-padding - notched-outline-variables.$leading-width); + @include rtl-mixins.reflexive-position( + left, + variables.$icon-padding - notched-outline-variables.$leading-width + ); } } } diff --git a/packages/mdc-select/helper-text/mdc-select-helper-text.scss b/packages/mdc-select/helper-text/mdc-select-helper-text.scss index 4d39a0a6f3e..6a121260234 100644 --- a/packages/mdc-select/helper-text/mdc-select-helper-text.scss +++ b/packages/mdc-select/helper-text/mdc-select-helper-text.scss @@ -22,7 +22,6 @@ @use "../functions"; @use "@material/theme/mixins" as mixins2; @use "@material/typography/mixins"; - @forward "../functions"; // postcss-bem-linter: define select-helper-text diff --git a/packages/mdc-select/icon/_mixins.scss b/packages/mdc-select/icon/_mixins.scss index 39cc2e66229..86d75f86f00 100644 --- a/packages/mdc-select/icon/_mixins.scss +++ b/packages/mdc-select/icon/_mixins.scss @@ -66,6 +66,10 @@ // Move the input's position, to allow room for the icon .mdc-select__selected-text { - @include rtl-mixins.reflexive-property(padding, $inputPadding /* left */, variables.$icon-right-padding /* right */); + @include rtl-mixins.reflexive-property( + padding, + $inputPadding /* left */, + variables.$icon-right-padding /* right */ + ); } } diff --git a/packages/mdc-select/icon/mdc-select-icon.scss b/packages/mdc-select/icon/mdc-select-icon.scss index 56f00975e54..200ff6042bd 100644 --- a/packages/mdc-select/icon/mdc-select-icon.scss +++ b/packages/mdc-select/icon/mdc-select-icon.scss @@ -20,7 +20,6 @@ // @use "./mixins"; - @forward "mixins"; @forward "variables"; diff --git a/packages/mdc-select/mdc-select.scss b/packages/mdc-select/mdc-select.scss index ba8d12d684b..c8abb92ebdb 100644 --- a/packages/mdc-select/mdc-select.scss +++ b/packages/mdc-select/mdc-select.scss @@ -38,7 +38,6 @@ @use "@material/ripple/functions"; @use "@material/theme/mixins" as theme-mixins; @use "@material/theme/variables" as theme-variables; - @forward "helper-text/mixins"; @forward "mixins"; @forward "variables"; diff --git a/packages/mdc-slider/mdc-slider.scss b/packages/mdc-slider/mdc-slider.scss index cb54f3548bc..a65b12f08d0 100644 --- a/packages/mdc-slider/mdc-slider.scss +++ b/packages/mdc-slider/mdc-slider.scss @@ -21,9 +21,7 @@ // @use "./mixins"; - @forward "keyframes"; @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-snackbar/mdc-snackbar.scss b/packages/mdc-snackbar/mdc-snackbar.scss index cbdef47184d..46a36f6b7eb 100644 --- a/packages/mdc-snackbar/mdc-snackbar.scss +++ b/packages/mdc-snackbar/mdc-snackbar.scss @@ -21,8 +21,6 @@ // @use "./mixins"; - @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-switch/mdc-switch.scss b/packages/mdc-switch/mdc-switch.scss index 562efd5cbe7..71bda6919cb 100644 --- a/packages/mdc-switch/mdc-switch.scss +++ b/packages/mdc-switch/mdc-switch.scss @@ -21,9 +21,7 @@ // @use "./mixins"; - @forward "functions"; @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-tab-bar/mdc-tab-bar.scss b/packages/mdc-tab-bar/mdc-tab-bar.scss index 175f3f49682..cd46a705999 100644 --- a/packages/mdc-tab-bar/mdc-tab-bar.scss +++ b/packages/mdc-tab-bar/mdc-tab-bar.scss @@ -22,8 +22,6 @@ */ @use "./mixins"; - @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-tab-indicator/mdc-tab-indicator.scss b/packages/mdc-tab-indicator/mdc-tab-indicator.scss index 69003be452b..503ea6a4310 100644 --- a/packages/mdc-tab-indicator/mdc-tab-indicator.scss +++ b/packages/mdc-tab-indicator/mdc-tab-indicator.scss @@ -22,7 +22,5 @@ */ @use "./mixins"; - @forward "mixins"; - @include mixins.core-styles; diff --git a/packages/mdc-tab-scroller/mdc-tab-scroller.scss b/packages/mdc-tab-scroller/mdc-tab-scroller.scss index 175f3f49682..cd46a705999 100644 --- a/packages/mdc-tab-scroller/mdc-tab-scroller.scss +++ b/packages/mdc-tab-scroller/mdc-tab-scroller.scss @@ -22,8 +22,6 @@ */ @use "./mixins"; - @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-tab/mdc-tab.scss b/packages/mdc-tab/mdc-tab.scss index 978433fd9b0..807678e47d7 100644 --- a/packages/mdc-tab/mdc-tab.scss +++ b/packages/mdc-tab/mdc-tab.scss @@ -21,9 +21,7 @@ // @use "./mixins"; - @forward "@material/tab-indicator/mixins" as indicator-*; @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-textfield/_mixins.scss b/packages/mdc-textfield/_mixins.scss index 15e48d3cd18..3693ff1f53e 100644 --- a/packages/mdc-textfield/_mixins.scss +++ b/packages/mdc-textfield/_mixins.scss @@ -467,7 +467,10 @@ $property-name: height, ); - $resolved-radius: list.nth(shape-functions.resolve-percentage-radius($height, shape-functions.prop-value($radius)), 1); + $resolved-radius: list.nth( + shape-functions.resolve-percentage-radius($height, shape-functions.prop-value($radius)), + 1 + ); @if (list.length(shape-functions.prop-value($radius)) > 1) { // stylelint-disable max-line-length @@ -481,11 +484,19 @@ @if ($resolved-radius > notched-outline-variables.$leading-width) { .mdc-text-field__input { - @include rtl-mixins.reflexive-property(padding, $resolved-radius + notched-outline-variables.$padding, 0); + @include rtl-mixins.reflexive-property( + padding, + $resolved-radius + notched-outline-variables.$padding, + 0 + ); } + .mdc-text-field-helper-line { - @include rtl-mixins.reflexive-property(padding, $resolved-radius + notched-outline-variables.$padding, $resolved-radius); + @include rtl-mixins.reflexive-property( + padding, + $resolved-radius + notched-outline-variables.$padding, + $resolved-radius + ); } } } @@ -516,12 +527,16 @@ &--with-leading-icon { .mdc-floating-label { - @include rtl-mixins.reflexive-position(left, (icon-variables.$icon-padding - notched-outline-variables.$leading-width)); + @include rtl-mixins.reflexive-position( + left, + (icon-variables.$icon-padding - notched-outline-variables.$leading-width) + ); &--float-above { @include rtl-mixins.reflexive-position( left, - (icon-variables.$icon-padding - notched-outline-variables.$leading-width) + notched-outline-variables.$padding + (icon-variables.$icon-padding - notched-outline-variables.$leading-width) + + notched-outline-variables.$padding ); } } @@ -658,7 +673,10 @@ } .mdc-floating-label { - @include rtl-mixins.reflexive-position(left, icon-variables.$icon-padding - notched-outline-variables.$leading-width); + @include rtl-mixins.reflexive-position( + left, + icon-variables.$icon-padding - notched-outline-variables.$leading-width + ); } } @@ -675,7 +693,10 @@ } .mdc-floating-label { - @include rtl-mixins.reflexive-position(left, icon-variables.$dense-icon-padding - notched-outline-variables.$leading-width); + @include rtl-mixins.reflexive-position( + left, + icon-variables.$dense-icon-padding - notched-outline-variables.$leading-width + ); } } diff --git a/packages/mdc-textfield/_variables.scss b/packages/mdc-textfield/_variables.scss index 7cd7c15ebda..addeb889a54 100644 --- a/packages/mdc-textfield/_variables.scss +++ b/packages/mdc-textfield/_variables.scss @@ -56,7 +56,11 @@ $disabled-placeholder-ink-color: rgba(theme-variables.prop-value(on-surface), .3 $disabled-helper-text-color: rgba(theme-variables.prop-value(on-surface), .38) !default; $background: color.mix(theme-variables.prop-value(on-surface), theme-variables.prop-value(surface), 4%) !default; -$disabled-background: color.mix(theme-variables.prop-value(on-surface), theme-variables.prop-value(surface), 2%) !default; +$disabled-background: color.mix( + theme-variables.prop-value(on-surface), + theme-variables.prop-value(surface), + 2% +) !default; $secondary-text: rgba(theme-variables.prop-value(on-surface), .6) !default; $outlined-idle-border: rgba(theme-variables.prop-value(on-surface), .38) !default; diff --git a/packages/mdc-textfield/helper-text/mdc-text-field-helper-text.scss b/packages/mdc-textfield/helper-text/mdc-text-field-helper-text.scss index eb5a9a71302..7fbda8d04e7 100644 --- a/packages/mdc-textfield/helper-text/mdc-text-field-helper-text.scss +++ b/packages/mdc-textfield/helper-text/mdc-text-field-helper-text.scss @@ -23,7 +23,6 @@ @use "../functions"; @use "@material/theme/mixins" as mixins2; @use "@material/typography/mixins"; - @forward "../functions"; // postcss-bem-linter: define text-field-helper-text diff --git a/packages/mdc-textfield/icon/mdc-text-field-icon.scss b/packages/mdc-textfield/icon/mdc-text-field-icon.scss index 875e9951ad8..e917d32cce0 100644 --- a/packages/mdc-textfield/icon/mdc-text-field-icon.scss +++ b/packages/mdc-textfield/icon/mdc-text-field-icon.scss @@ -21,7 +21,6 @@ // @use "./mixins"; - @forward "mixins"; .mdc-text-field__icon { diff --git a/packages/mdc-textfield/mdc-text-field.scss b/packages/mdc-textfield/mdc-text-field.scss index b87f60ad4ef..2f03e2bf539 100644 --- a/packages/mdc-textfield/mdc-text-field.scss +++ b/packages/mdc-textfield/mdc-text-field.scss @@ -41,7 +41,6 @@ @use "character-counter/mixins" as character-counter-mixins; @use "helper-text/mixins" as helper-text-mixins; @use "icon/mixins" as icon-mixins; - @forward "character-counter/mixins"; @forward "functions"; @forward "helper-text/mixins"; diff --git a/packages/mdc-theme/mdc-theme.scss b/packages/mdc-theme/mdc-theme.scss index 333416933ba..4a6253aafcc 100644 --- a/packages/mdc-theme/mdc-theme.scss +++ b/packages/mdc-theme/mdc-theme.scss @@ -21,10 +21,8 @@ // @use "./mixins"; - @forward "constants"; @forward "functions"; @forward "mixins"; @forward "variables"; - @include mixins.core-styles; diff --git a/packages/mdc-top-app-bar/mdc-top-app-bar.scss b/packages/mdc-top-app-bar/mdc-top-app-bar.scss index ed20c4551bc..1d94d73a1dc 100644 --- a/packages/mdc-top-app-bar/mdc-top-app-bar.scss +++ b/packages/mdc-top-app-bar/mdc-top-app-bar.scss @@ -26,7 +26,6 @@ @use "@material/typography/mixins" as typography-mixins; @use "./mixins"; @use "./variables"; - @forward "mixins"; @forward "variables"; diff --git a/packages/mdc-touch-target/mdc-touch-target.scss b/packages/mdc-touch-target/mdc-touch-target.scss index 2737d1d52c2..598177ef372 100644 --- a/packages/mdc-touch-target/mdc-touch-target.scss +++ b/packages/mdc-touch-target/mdc-touch-target.scss @@ -21,8 +21,6 @@ // @use "./mixins"; - @forward "mixins"; @forward "variables"; - @include mixins.wrapper; diff --git a/packages/mdc-typography/mdc-typography.scss b/packages/mdc-typography/mdc-typography.scss index 98daf5a1bf8..0281d527d6d 100644 --- a/packages/mdc-typography/mdc-typography.scss +++ b/packages/mdc-typography/mdc-typography.scss @@ -21,9 +21,7 @@ // @use "./mixins"; - @forward "functions"; @forward "mixins"; @forward "variables"; - @include mixins.core-styles;