mirror of
https://github.com/material-components/material-web.git
synced 2026-03-09 00:09:23 +08:00
56 lines
1.5 KiB
SCSS
56 lines
1.5 KiB
SCSS
/**
|
|
* @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 './icon-theme';
|
|
|
|
$_custom-property-prefix: 'text-button';
|
|
|
|
$light-theme: map.merge(
|
|
button-theme.$light-theme,
|
|
(
|
|
disabled-label-text-color: rgba(#000, 0.38),
|
|
focus-label-text-color: #6200ee,
|
|
focus-state-layer-color: #6200ee,
|
|
focus-state-layer-opacity: 0.12,
|
|
hover-label-text-color: #6200ee,
|
|
hover-state-layer-color: #6200ee,
|
|
hover-state-layer-opacity: 0.04,
|
|
label-text-color: #6200ee,
|
|
pressed-label-text-color: #6200ee,
|
|
pressed-state-layer-color: #6200ee,
|
|
pressed-state-layer-opacity: 0.12,
|
|
with-icon-disabled-icon-color: rgba(#000, 0.38),
|
|
with-icon-focus-icon-color: #6200ee,
|
|
with-icon-hover-icon-color: #6200ee,
|
|
with-icon-icon-color: #6200ee,
|
|
with-icon-pressed-icon-color: #6200ee,
|
|
)
|
|
);
|
|
|
|
@mixin theme($theme, $resolvers: resolvers.$material) {
|
|
@include theme.validate-theme($light-theme, $theme);
|
|
$theme: elevation-theme.resolve-theme-elevation-keys(
|
|
$theme,
|
|
$resolvers: $resolvers
|
|
);
|
|
@include keys.declare-custom-properties($theme, $_custom-property-prefix);
|
|
}
|
|
|
|
@mixin theme-styles($theme, $resolvers: resolvers.$material) {
|
|
$theme: keys.create-theme-properties(
|
|
$theme,
|
|
$prefix: $_custom-property-prefix
|
|
);
|
|
|
|
@include button-theme.theme-styles($theme, $resolvers: $resolvers);
|
|
@include icon-theme.theme-styles($theme, $resolvers: $resolvers);
|
|
}
|