mirror of
https://github.com/material-components/material-web.git
synced 2026-03-09 00:09:23 +08:00
fix(button): misc elevation Sass fixes
PiperOrigin-RevId: 399731949
This commit is contained in:
parent
b1d21d02e1
commit
df2d0f57a2
@ -6,6 +6,7 @@
|
||||
|
||||
@use 'sass:map';
|
||||
@use '@material/theme/keys';
|
||||
@use '@material/theme/theme';
|
||||
@use '@material/tokens/resolvers';
|
||||
@use './button-theme';
|
||||
@use './elevation-theme';
|
||||
@ -46,7 +47,7 @@ $light-theme: map.merge(
|
||||
@include theme.validate-theme($light-theme, $theme);
|
||||
$theme: elevation-theme.resolve-theme-elevation-keys(
|
||||
$theme,
|
||||
$resolvers: $resolvers
|
||||
$resolver: map.get($resolvers, elevation)
|
||||
);
|
||||
@include keys.declare-custom-properties($theme, $_custom-property-prefix);
|
||||
}
|
||||
|
||||
@ -74,11 +74,10 @@ $_selectors: button-theme.$selectors;
|
||||
}
|
||||
|
||||
@function resolve-theme-elevation-keys($theme, $resolver) {
|
||||
$elevation-resolver: map.get($resolver, elevation);
|
||||
$shadow-color: map.get($theme, container-shadow-color);
|
||||
@if $elevation-resolver == null {
|
||||
@if $resolver == null {
|
||||
@return $theme;
|
||||
}
|
||||
$shadow-color: map.get($theme, container-shadow-color);
|
||||
|
||||
$elevation-keys: (
|
||||
container-elevation,
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
|
||||
@use 'sass:map';
|
||||
@use '@material/theme/keys';
|
||||
@use '@material/theme/theme';
|
||||
@use '@material/tokens/resolvers';
|
||||
@use './button-theme';
|
||||
@use './elevation-theme';
|
||||
@ -46,7 +47,7 @@ $light-theme: map.merge(
|
||||
@include theme.validate-theme($light-theme, $theme);
|
||||
$theme: elevation-theme.resolve-theme-elevation-keys(
|
||||
$theme,
|
||||
$resolvers: $resolvers
|
||||
$resolver: map.get($resolvers, elevation)
|
||||
);
|
||||
@include keys.declare-custom-properties($theme, $_custom-property-prefix);
|
||||
}
|
||||
|
||||
@ -4,14 +4,9 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2021 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
@use 'sass:map';
|
||||
@use '@material/theme/keys';
|
||||
@use '@material/theme/theme';
|
||||
@use '@material/tokens/resolvers';
|
||||
@use './button-theme';
|
||||
@use './elevation-theme';
|
||||
@ -52,7 +47,7 @@ $light-theme: map.merge(
|
||||
@include theme.validate-theme($light-theme, $theme);
|
||||
$theme: elevation-theme.resolve-theme-elevation-keys(
|
||||
$theme,
|
||||
$resolvers: $resolvers
|
||||
$resolver: map.get($resolvers, elevation)
|
||||
);
|
||||
@include keys.declare-custom-properties($theme, $_custom-property-prefix);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user