mirror of
https://github.com/material-components/material-web.git
synced 2026-03-09 00:09:23 +08:00
47 lines
1.0 KiB
SCSS
47 lines
1.0 KiB
SCSS
//
|
|
// Copyright 2022 Google LLC
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
// stylelint-disable selector-class-pattern --
|
|
// Selector '.md3-*' should only be used in this project.
|
|
|
|
// go/keep-sorted start
|
|
@use '../../sass/shape';
|
|
@use '../../sass/theme';
|
|
@use '../../tokens';
|
|
@use './shared';
|
|
// go/keep-sorted end
|
|
|
|
@mixin theme($tokens) {
|
|
$tokens: theme.validate-theme(tokens.md-comp-fab-surface-values(), $tokens);
|
|
$tokens: shared.resolve-tokens($tokens);
|
|
$tokens: theme.create-theme-vars($tokens, 'fab');
|
|
$tokens: shape.resolve-tokens($tokens, 'container-shape');
|
|
|
|
@include theme.emit-theme-vars($tokens);
|
|
}
|
|
|
|
@mixin styles() {
|
|
$tokens: tokens.md-comp-fab-surface-values();
|
|
|
|
$tokens: shared.resolve-tokens($tokens);
|
|
$tokens: theme.create-theme-vars($tokens, 'fab');
|
|
$tokens: shape.resolve-tokens($tokens, 'container-shape');
|
|
|
|
:host {
|
|
@each $token, $value in $tokens {
|
|
--_#{$token}: #{$value};
|
|
}
|
|
}
|
|
|
|
.md3-fab {
|
|
width: var(--_container-width);
|
|
height: var(--_container-height);
|
|
}
|
|
|
|
.md3-fab--regular {
|
|
padding: 0;
|
|
}
|
|
}
|