mirror of
https://github.com/material-components/material-web.git
synced 2026-03-09 00:09:23 +08:00
42 lines
1.1 KiB
SCSS
42 lines
1.1 KiB
SCSS
//
|
|
// Copyright 2021 Google LLC
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
// stylelint-disable selector-class-pattern --
|
|
// Selector '.md3-*' should only be used in this project.
|
|
|
|
@mixin styles() {
|
|
// The icon CSS class overrides styles defined in the .material-icons CSS
|
|
// class, which is loaded separately so the order of CSS definitions is not
|
|
// guaranteed. Therefore, increase specifity to ensure overrides apply.
|
|
::slotted([slot='icon']) {
|
|
.md3-button & {
|
|
display: inline-flex;
|
|
position: relative;
|
|
writing-mode: horizontal-tb;
|
|
fill: currentColor;
|
|
color: var(--_with-icon-icon-color);
|
|
font-size: var(--_with-icon-icon-size);
|
|
inline-size: var(--_with-icon-icon-size);
|
|
block-size: var(--_with-icon-icon-size);
|
|
}
|
|
|
|
.md3-button:hover & {
|
|
color: var(--_with-icon-hover-icon-color);
|
|
}
|
|
|
|
.md3-button:focus & {
|
|
color: var(--_with-icon-focus-icon-color);
|
|
}
|
|
|
|
.md3-button:active & {
|
|
color: var(--_with-icon-pressed-icon-color);
|
|
}
|
|
|
|
.md3-button:disabled & {
|
|
color: var(--_with-icon-disabled-icon-color);
|
|
}
|
|
}
|
|
}
|