mirror of
https://github.com/material-components/material-web.git
synced 2026-03-09 00:09:23 +08:00
58 lines
1.4 KiB
SCSS
58 lines
1.4 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.
|
|
.md3-button__icon-slot-container {
|
|
display: inline-flex;
|
|
|
|
::slotted([slot='icon']),
|
|
.md3-button__icon {
|
|
display: inline-flex;
|
|
position: relative;
|
|
writing-mode: horizontal-tb;
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
|
|
.md3-button__icon--leading {
|
|
::slotted([slot='icon']),
|
|
.md3-button__icon {
|
|
margin-inline-end: 8px;
|
|
}
|
|
}
|
|
|
|
.md3-button__icon--trailing {
|
|
::slotted([slot='icon']),
|
|
.md3-button__icon {
|
|
margin-inline-start: 8px;
|
|
}
|
|
}
|
|
}
|