Liz Mitchell 161a61fa23 chore: update import paths
PiperOrigin-RevId: 413507701
2021-12-01 14:12:03 -08:00

50 lines
1.4 KiB
SCSS

//
// Copyright 2021 Google LLC
// SPDX-License-Identifier: Apache-2.0
//
@use 'sass:map';
@use '../../sass/resolvers';
@use '../../sass/theme';
@use './button-theme';
@use './icon-theme';
$_custom-property-prefix: 'text-button';
$light-theme: map.merge(
button-theme.$light-theme,
(
disabled-label-text-color: rgba(#1c1b1f, 0.38),
focus-label-text-color: #6750a4,
focus-state-layer-color: #6750a4,
focus-state-layer-opacity: 0.12,
hover-label-text-color: #6750a4,
hover-state-layer-color: #6750a4,
hover-state-layer-opacity: 0.08,
label-text-color: #6750a4,
pressed-label-text-color: #6750a4,
pressed-state-layer-color: #6750a4,
pressed-state-layer-opacity: 0.12,
with-icon-disabled-icon-color: rgba(#1c1b1f, 0.38),
with-icon-focus-icon-color: #6750a4,
with-icon-hover-icon-color: #6750a4,
with-icon-icon-color: #6750a4,
with-icon-pressed-icon-color: #6750a4,
)
);
@mixin theme($theme, $resolvers: resolvers.$material) {
$theme: theme.validate-theme($light-theme, $theme);
$theme: theme.create-theme-vars($theme, $_custom-property-prefix);
@include theme.emit-theme-vars($theme);
}
@mixin theme-styles($theme, $resolvers: resolvers.$material) {
$theme: theme.validate-theme-styles($light-theme, $theme);
$theme: theme.create-theme-vars($theme, $_custom-property-prefix);
@include button-theme.theme-styles($theme);
@include icon-theme.theme-styles($theme);
}