-
Notifications
You must be signed in to change notification settings - Fork 827
/
_icon.scss
50 lines (41 loc) · 1.32 KB
/
_icon.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//
// 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']) {
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']) {
margin-inline-end: 8px;
}
.md3-button__icon--trailing ::slotted([slot='icon']) {
margin-inline-start: 8px;
}
}