1 | .md-standard-icon-button { |
2 | position: relative; |
3 | display: inline-block; |
4 | border: none; |
5 | padding: 0.25rem; |
6 | background-color: transparent; |
7 | text-decoration: none; |
8 | border-radius: 50%; |
9 | overflow: hidden; |
10 | } |
11 | |
12 | .md-standard-icon-button[hidden] { |
13 | display: none; |
14 | } |
15 | |
16 | |
17 | .md-standard-icon-button::after { |
18 | content: ""; |
19 | position: absolute; |
20 | top: 0.25rem; |
21 | right: 0.25rem; |
22 | left: 0.25rem; |
23 | bottom: 0.25rem; |
24 | border-radius: 50%; |
25 | } |
26 | |
27 | .md-standard-icon-button span { |
28 | position: relative; |
29 | padding: 0.5rem; |
30 | color: var(--md-sys-color-on-surface-variant); |
31 | font-size: 1.5rem; |
32 | width: 1.5rem; |
33 | height: 1.5rem; |
34 | } |
35 | |
36 | .md-standard-icon-button.avatar span { |
37 | padding: 0.3125rem; |
38 | font-size: 1.875rem; |
39 | width: 1.875rem; |
40 | height: 1.875rem; |
41 | } |
42 | |
43 | .md-standard-icon-button:hover::after { |
44 | background-color: var(--md-sys-color-on-surface-variant); |
45 | opacity: var(--md-sys-state-hover-state-layer-opacity); |
46 | } |
47 | |
48 | .md-standard-icon-button:hover span { |
49 | color: var(--md-sys-color-on-surface-variant); |
50 | } |
51 | |
52 | .md-standard-icon-button:focus { |
53 | outline: none; |
54 | } |
55 | |
56 | .md-standard-icon-button:focus::after { |
57 | background-color: var(--md-sys-color-on-surface-variant); |
58 | opacity: var(--md-sys-state-focus-state-layer-opacity); |
59 | } |
60 | |
61 | .md-standard-icon-button:focus span { |
62 | color: var(--md-sys-color-on-surface-variant); |
63 | } |
64 | |
65 | .md-standard-icon-button:active { |
66 | background-position: center; |
67 | background-image: |
68 | radial-gradient(circle, var(--md-riple-color) 1%, transparent 1%); |
69 | background-size: 100%; |
70 | animation-name: md-ripple; |
71 | animation-duration: var(--md-sys-motion-duration-500); |
72 | } |
73 | |
74 | .md-standard-icon-button:active::after { |
75 | background-color: var(--md-sys-color-on-surface-variant); |
76 | opacity: var(--md-sys-state-pressed-state-layer-opacity); |
77 | } |
78 | |
79 | .md-standard-icon-button:active span { |
80 | -color: var(--md-sys-color-on-surface-variant); |
81 | } |
82 | |
83 | .md-standard-icon-button:disabled::after { |
84 | background-color: transparent !important; |
85 | opacity: 1; |
86 | } |
87 | |
88 | .md-standard-icon-button:disabled span { |
89 | color: var(--md-sys-color-on-surface) !important; |
90 | opacity: 0.38; |
91 | } |
92 | |
93 | .md-standard-icon-button:disabled:active { |
94 | background-image: none; |
95 | animation-name: none; |
96 | animation-duration: unset; |
97 | } |