Skip to content

Commit 58e8f03

Browse files
committed
refactor: fix lint
1 parent 0e18cc1 commit 58e8f03

File tree

14 files changed

+224
-99
lines changed

14 files changed

+224
-99
lines changed

src/material/button-toggle/_m2-button-toggle.scss

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,29 @@ $prefix: (mat, button-toggle);
3737

3838
@return (
3939
background-color: inspection.get-theme-color($theme, background, card),
40-
disabled-selected-state-background-color:inspection.get-theme-color($theme, background, selected-disabled-button),
40+
disabled-selected-state-background-color:
41+
inspection.get-theme-color($theme, background, selected-disabled-button),
4142
disabled-selected-state-text-color: inspection.get-theme-color($theme, foreground, text),
4243
disabled-state-background-color: inspection.get-theme-color($theme, background, card),
4344
disabled-state-text-color: inspection.get-theme-color($theme, foreground, disabled-button),
4445
divider-color: $divider-color,
45-
legacy-disabled-selected-state-background-color: inspection.get-theme-color($theme, background, selected-disabled-button),
46-
legacy-disabled-state-background-color: inspection.get-theme-color($theme, background, disabled-button-toggle),
47-
legacy-disabled-state-text-color: inspection.get-theme-color($theme, foreground, disabled-button),
48-
legacy-selected-state-background-color: inspection.get-theme-color($theme, background, selected-button),
49-
legacy-selected-state-text-color: inspection.get-theme-color($theme, foreground, secondary-text),
46+
legacy-disabled-selected-state-background-color:
47+
inspection.get-theme-color($theme, background, selected-disabled-button),
48+
legacy-disabled-state-background-color:
49+
inspection.get-theme-color($theme, background, disabled-button-toggle),
50+
legacy-disabled-state-text-color:
51+
inspection.get-theme-color($theme, foreground, disabled-button),
52+
legacy-selected-state-background-color:
53+
inspection.get-theme-color($theme, background, selected-button),
54+
legacy-selected-state-text-color:
55+
inspection.get-theme-color($theme, foreground, secondary-text),
5056
legacy-state-layer-color: inspection.get-theme-color($theme, background, focused-button),
5157
legacy-text-color: inspection.get-theme-color($theme, foreground, hint-text),
52-
selected-state-background-color: inspection.get-theme-color($theme, background, selected-button),
58+
selected-state-background-color:
59+
inspection.get-theme-color($theme, background, selected-button),
5360
selected-state-text-color: inspection.get-theme-color($theme, foreground, text),
54-
state-layer-color: sass-utils.safe-color-change(inspection.get-theme-color($theme, background, focused-button), $alpha: 1),
61+
state-layer-color: sass-utils.safe-color-change(
62+
inspection.get-theme-color($theme, background, focused-button), $alpha: 1),
5563
text-color: inspection.get-theme-color($theme, foreground, text),
5664
);
5765
}

src/material/button-toggle/button-toggle.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ $legacy-border-radius: 2px !default;
278278
// In high contrast mode, we use a border for the checked state because backgrounds
279279
// can either be opaque or transparent. We set the border height to a value that is larger
280280
// than usual button toggles are. This allows us to keep this high contrast style in the
281-
// base component style, instead of making it dependent on height determined through density.
281+
// base component style, instead of making it dependent on height determined through
282+
// density.
282283
border-bottom: solid 500px;
283284
}
284285
}
@@ -291,7 +292,8 @@ $legacy-border-radius: 2px !default;
291292

292293
// Disable pointer events for the ripple container, because the container will overlay the user
293294
// content and we don't want to prevent mouse clicks that should toggle the state.
294-
// Pointer events can be safely disabled because the ripple trigger element is the label element.
295+
// Pointer events can be safely disabled because the ripple trigger element is the label
296+
// element.
295297
pointer-events: none;
296298
}
297299

src/material/button/_m2-button.scss

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,19 @@ $prefix: (mat, button);
5757

5858
@return (
5959
filled-container-color: inspection.get-theme-color($theme, background, card),
60-
filled-disabled-container-color: inspection.get-theme-color($theme, foreground, disabled-button, 0.12),
61-
filled-disabled-label-text-color: inspection.get-theme-color($theme, foreground, disabled-button, if($is-dark, 0.5, 0.38)),
60+
filled-disabled-container-color:
61+
inspection.get-theme-color($theme, foreground, disabled-button, 0.12),
62+
filled-disabled-label-text-color:
63+
inspection.get-theme-color($theme, foreground, disabled-button, if($is-dark, 0.5, 0.38)),
6264
filled-disabled-state-layer-color: inspection.get-theme-color($theme, foreground, base),
6365
filled-focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
6466
filled-hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
6567
filled-label-text-color: inspection.get-theme-color($theme, foreground, text, 1),
6668
filled-pressed-state-layer-opacity: if($is-dark, 0.24, 0.12),
6769
filled-ripple-color: inspection.get-theme-color($theme, foreground, base, 0.1),
6870
filled-state-layer-color: inspection.get-theme-color($theme, foreground, base),
69-
outlined-disabled-label-text-color: inspection.get-theme-color($theme, foreground, disabled-button, if($is-dark, 0.5, 0.38)),
71+
outlined-disabled-label-text-color:
72+
inspection.get-theme-color($theme, foreground, disabled-button, if($is-dark, 0.5, 0.38)),
7073
outlined-disabled-outline-color: $outline,
7174
outlined-disabled-state-layer-color: inspection.get-theme-color($theme, foreground, base),
7275
outlined-focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
@@ -77,16 +80,19 @@ $prefix: (mat, button);
7780
outlined-ripple-color: inspection.get-theme-color($theme, foreground, base, 0.1),
7881
outlined-state-layer-color: inspection.get-theme-color($theme, foreground, base),
7982
protected-container-color: inspection.get-theme-color($theme, background, card),
80-
protected-disabled-container-color: inspection.get-theme-color($theme, foreground, disabled-button, 0.12),
81-
protected-disabled-label-text-color: inspection.get-theme-color($theme, foreground, disabled-button, if($is-dark, 0.5, 0.38)),
83+
protected-disabled-container-color:
84+
inspection.get-theme-color($theme, foreground, disabled-button, 0.12),
85+
protected-disabled-label-text-color:
86+
inspection.get-theme-color($theme, foreground, disabled-button, if($is-dark, 0.5, 0.38)),
8287
protected-disabled-state-layer-color: inspection.get-theme-color($theme, foreground, base),
8388
protected-focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
8489
protected-hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
8590
protected-label-text-color: inspection.get-theme-color($theme, foreground, text, 1),
8691
protected-pressed-state-layer-opacity: if($is-dark, 0.24, 0.12),
8792
protected-ripple-color: inspection.get-theme-color($theme, foreground, base, 0.1),
8893
protected-state-layer-color: inspection.get-theme-color($theme, foreground, base),
89-
text-disabled-label-text-color: inspection.get-theme-color($theme, foreground, disabled-button, if($is-dark, 0.5, 0.38)),
94+
text-disabled-label-text-color:
95+
inspection.get-theme-color($theme, foreground, disabled-button, if($is-dark, 0.5, 0.38)),
9096
text-disabled-state-layer-color: inspection.get-theme-color($theme, foreground, base),
9197
text-focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
9298
text-hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
@@ -95,8 +101,10 @@ $prefix: (mat, button);
95101
text-ripple-color: inspection.get-theme-color($theme, foreground, base, 0.1),
96102
text-state-layer-color: inspection.get-theme-color($theme, foreground, base),
97103
tonal-container-color: inspection.get-theme-color($theme, background, card),
98-
tonal-disabled-container-color: inspection.get-theme-color($theme, foreground, disabled-button, 0.12),
99-
tonal-disabled-label-text-color: inspection.get-theme-color($theme, foreground, disabled-button, if($is-dark, 0.5, 0.38)),
104+
tonal-disabled-container-color:
105+
inspection.get-theme-color($theme, foreground, disabled-button, 0.12),
106+
tonal-disabled-label-text-color:
107+
inspection.get-theme-color($theme, foreground, disabled-button, if($is-dark, 0.5, 0.38)),
100108
tonal-disabled-state-layer-color: inspection.get-theme-color($theme, foreground, base),
101109
tonal-focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
102110
tonal-hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
@@ -141,14 +149,20 @@ $prefix: (mat, button);
141149
filled-state-layer-color: $state-layer-color,
142150
outlined-label-text-color: inspection.get-theme-color($theme, $palette-name, default),
143151
outlined-outline-color: map.get(get-color-tokens($theme), outline-color),
144-
outlined-ripple-color: if(meta.type-of($color) == color, rgba($color, $ripple-opacity), inspection.get-theme-color($theme, foreground, base, $ripple-opacity)),
152+
outlined-ripple-color:
153+
if(meta.type-of($color) == color,
154+
rgba($color, $ripple-opacity),
155+
inspection.get-theme-color($theme, foreground, base, $ripple-opacity)),
145156
outlined-state-layer-color: $color,
146157
protected-container-color: $container-color,
147158
protected-label-text-color: $label-text-color,
148159
protected-ripple-color: $ripple-color,
149160
protected-state-layer-color: $state-layer-color,
150161
text-label-text-color: inspection.get-theme-color($theme, $palette-name),
151-
text-ripple-color: if(meta.type-of($color) == color, rgba($color, $ripple-opacity), inspection.get-theme-color($theme, foreground, base, $ripple-opacity)),
162+
text-ripple-color:
163+
if(meta.type-of($color) == color,
164+
rgba($color, $ripple-opacity),
165+
inspection.get-theme-color($theme, foreground, base, $ripple-opacity)),
152166
text-state-layer-color: $color,
153167
tonal-container-color: inspection.get-theme-color($theme, $palette-name, default),
154168
tonal-label-text-color: inspection.get-theme-color($theme, $palette-name, default-contrast, 1),

src/material/button/_m2-fab.scss

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,21 @@ $prefix: (mat, fab);
3737

3838
@return (
3939
container-color: inspection.get-theme-color($theme, background, card),
40-
disabled-state-container-color:inspection.get-theme-color($theme, background, disabled-button, 0.12),
41-
disabled-state-foreground-color:inspection.get-theme-color($theme, foreground, disabled-button, if($is-dark, 0.5, 0.38)),
40+
disabled-state-container-color:
41+
inspection.get-theme-color($theme, background, disabled-button, 0.12),
42+
disabled-state-foreground-color:
43+
inspection.get-theme-color($theme, foreground, disabled-button, if($is-dark, 0.5, 0.38)),
4244
disabled-state-layer-color: inspection.get-theme-color($theme, foreground, base),
4345
focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
4446
foreground-color: inspection.get-theme-color($theme, foreground, base),
4547
hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
4648
pressed-state-layer-opacity: if($is-dark, 0.24, 0.12),
4749
ripple-color: inspection.get-theme-color($theme, foreground, base, 0.1),
4850
small-container-color: inspection.get-theme-color($theme, background, card),
49-
small-disabled-state-container-color: inspection.get-theme-color($theme, background, disabled-button, 0.12),
50-
small-disabled-state-foreground-color: inspection.get-theme-color($theme, foreground, disabled-button, if($is-dark, 0.5, 0.38)),
51+
small-disabled-state-container-color:
52+
inspection.get-theme-color($theme, background, disabled-button, 0.12),
53+
small-disabled-state-foreground-color:
54+
inspection.get-theme-color($theme, foreground, disabled-button, if($is-dark, 0.5, 0.38)),
5155
small-disabled-state-layer-color: inspection.get-theme-color($theme, foreground, base),
5256
small-focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
5357
small-foreground-color: inspection.get-theme-color($theme, foreground, base),

0 commit comments

Comments
 (0)