Skip to content

Commit d6ee48c

Browse files
refactor(buttons): remove shadow related parameters from the outlined and flat button themes (#500)
Co-authored-by: Simeon Simeonoff <sim.simeonoff@gmail.com>
1 parent b323cca commit d6ee48c

File tree

2 files changed

+0
-66
lines changed

2 files changed

+0
-66
lines changed

sass/themes/components/button/_flat-button-theme.scss

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@
3939
/// @param {Color} $focus-visible-border-color [null] - The focus-visible border color of the button.
4040
/// @param {Color} $active-border-color [null] - The active border color of the button.
4141
/// @param {Color} $shadow-color [null] - The shadow color of the button.
42-
/// @param {Color} $resting-shadow [null] - The shadow of the button in its idle state.
43-
/// @param {Color} $hover-shadow [null] - The shadow of the button in its hover state.
44-
/// @param {Color} $focus-shadow [null] - The shadow of the button in its focus state.
45-
/// @param {Color} $active-shadow [null] - The shadow of the button in its focus state.
4642
/// @param {Color} $disabled-background [null] - The disabled background color of the button.
4743
/// @param {Color} $disabled-foreground [null] - The disabled text color of the button.
4844
/// @param {Color} $disabled-icon-color [null] - The disabled icon color of the button.
@@ -89,11 +85,6 @@
8985
9086
$shadow-color: null,
9187
92-
$resting-shadow: null,
93-
$hover-shadow: null,
94-
$focus-shadow: null,
95-
$active-shadow: null,
96-
9788
$disabled-background: null,
9889
$disabled-foreground: null,
9990
$disabled-icon-color: $disabled-foreground,
@@ -283,26 +274,6 @@
283274
}
284275
}
285276

286-
@if not($resting-shadow) {
287-
$resting-elevation: map.get($button-schema, 'resting-elevation');
288-
$resting-shadow: elevation($resting-elevation);
289-
}
290-
291-
@if not($hover-shadow) {
292-
$hover-elevation: map.get($button-schema, 'hover-elevation');
293-
$hover-shadow: elevation($hover-elevation);
294-
}
295-
296-
@if not($focus-shadow) {
297-
$focus-elevation: map.get($button-schema, 'focus-elevation');
298-
$focus-shadow: elevation($focus-elevation);
299-
}
300-
301-
@if not($active-shadow) {
302-
$active-elevation: map.get($button-schema, 'active-elevation');
303-
$active-shadow: elevation($active-elevation);
304-
}
305-
306277
@return extend(
307278
$theme,
308279
(
@@ -329,10 +300,6 @@
329300
focus-visible-border-color: $focus-visible-border-color,
330301
active-border-color: $active-border-color,
331302
shadow-color: $shadow-color,
332-
resting-elevation: $resting-shadow,
333-
hover-elevation: $hover-shadow,
334-
focus-elevation: $focus-shadow,
335-
active-elevation: $active-shadow,
336303
disabled-background: $disabled-background,
337304
disabled-foreground: $disabled-foreground,
338305
disabled-icon-color: $disabled-icon-color,

sass/themes/components/button/_outlined-button-theme.scss

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@
3939
/// @param {Color} $focus-visible-border-color [null] - The focus-visible border color of the button.
4040
/// @param {Color} $active-border-color [null] - The active border color of the button.
4141
/// @param {Color} $shadow-color [null] - The shadow color of the button.
42-
/// @param {Color} $resting-shadow [null] - The shadow of the button in its idle state.
43-
/// @param {Color} $hover-shadow [null] - The shadow of the button in its hover state.
44-
/// @param {Color} $focus-shadow [null] - The shadow of the button in its focus state.
45-
/// @param {Color} $active-shadow [null] - The shadow of the button in its focus state.
4642
/// @param {Color} $disabled-background [null] - The disabled background color of the button.
4743
/// @param {Color} $disabled-foreground [null] - The disabled text color of the button.
4844
/// @param {Color} $disabled-icon-color [null] - The disabled icon color of the button.
@@ -89,11 +85,6 @@
8985
9086
$shadow-color: null,
9187
92-
$resting-shadow: null,
93-
$hover-shadow: null,
94-
$focus-shadow: null,
95-
$active-shadow: null,
96-
9788
$disabled-background: null,
9889
$disabled-foreground: null,
9990
$disabled-icon-color: $disabled-foreground,
@@ -349,26 +340,6 @@
349340
}
350341
}
351342

352-
@if not($resting-shadow) {
353-
$resting-elevation: map.get($button-schema, 'resting-elevation');
354-
$resting-shadow: elevation($resting-elevation);
355-
}
356-
357-
@if not($hover-shadow) {
358-
$hover-elevation: map.get($button-schema, 'hover-elevation');
359-
$hover-shadow: elevation($hover-elevation);
360-
}
361-
362-
@if not($focus-shadow) {
363-
$focus-elevation: map.get($button-schema, 'focus-elevation');
364-
$focus-shadow: elevation($focus-elevation);
365-
}
366-
367-
@if not($active-shadow) {
368-
$active-elevation: map.get($button-schema, 'active-elevation');
369-
$active-shadow: elevation($active-elevation);
370-
}
371-
372343
@return extend(
373344
$theme,
374345
(
@@ -395,10 +366,6 @@
395366
focus-visible-border-color: $focus-visible-border-color,
396367
active-border-color: $active-border-color,
397368
shadow-color: $shadow-color,
398-
resting-elevation: $resting-shadow,
399-
hover-elevation: $hover-shadow,
400-
focus-elevation: $focus-shadow,
401-
active-elevation: $active-shadow,
402369
disabled-background: $disabled-background,
403370
disabled-foreground: $disabled-foreground,
404371
disabled-icon-color: $disabled-icon-color,

0 commit comments

Comments
 (0)