2022-07-21 13:47:00 -07:00
|
|
|
//
|
|
|
|
|
// Copyright 2021 Google LLC
|
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
//
|
|
|
|
|
|
2023-02-14 11:09:50 -08:00
|
|
|
// go/keep-sorted start
|
2023-04-26 13:30:02 -07:00
|
|
|
@use 'sass:list';
|
2022-10-19 11:37:19 -07:00
|
|
|
@use 'sass:map';
|
2023-02-14 11:09:50 -08:00
|
|
|
// go/keep-sorted end
|
|
|
|
|
// go/keep-sorted start
|
2022-11-29 14:00:55 -08:00
|
|
|
@use '../../tokens';
|
2023-02-14 11:09:50 -08:00
|
|
|
// go/keep-sorted end
|
2022-10-19 11:37:19 -07:00
|
|
|
|
|
|
|
|
@mixin theme($tokens) {
|
2024-01-26 09:13:19 -08:00
|
|
|
$supported-tokens: tokens.$md-comp-elevated-button-supported-tokens;
|
2023-03-21 14:06:06 -07:00
|
|
|
@each $token, $value in $tokens {
|
2023-05-24 17:59:06 -07:00
|
|
|
@if list.index($supported-tokens, $token) == null {
|
2023-04-26 13:30:02 -07:00
|
|
|
@error 'Token `#{$token}` is not a supported token.';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@if $value {
|
|
|
|
|
--md-elevated-button-#{$token}: #{$value};
|
|
|
|
|
}
|
2023-03-21 14:06:06 -07:00
|
|
|
}
|
2022-10-19 11:37:19 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@mixin styles() {
|
2024-07-15 11:43:16 -07:00
|
|
|
$tokens: tokens.md-comp-elevated-button-values();
|
2022-10-19 11:37:19 -07:00
|
|
|
|
2022-12-08 14:14:48 -08:00
|
|
|
:host {
|
2024-01-26 09:13:19 -08:00
|
|
|
// Only use the logical properties.
|
|
|
|
|
$tokens: map.remove($tokens, 'container-shape');
|
2022-10-19 11:37:19 -07:00
|
|
|
@each $token, $value in $tokens {
|
2024-01-25 16:13:13 -08:00
|
|
|
--_#{$token}: #{$value};
|
2022-10-19 11:37:19 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|