1 | //
|
2 | // Copyright 2017 Google Inc.
|
3 | //
|
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy
|
5 | // of this software and associated documentation files (the "Software"), to deal
|
6 | // in the Software without restriction, including without limitation the rights
|
7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8 | // copies of the Software, and to permit persons to whom the Software is
|
9 | // furnished to do so, subject to the following conditions:
|
10 | //
|
11 | // The above copyright notice and this permission notice shall be included in
|
12 | // all copies or substantial portions of the Software.
|
13 | //
|
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20 | // THE SOFTWARE.
|
21 | //
|
22 |
|
23 | // postcss-bem-linter: define icon-toggle
|
24 |
|
25 | @import "@material/animation/functions";
|
26 | @import "@material/ripple/common";
|
27 | @import "@material/ripple/mixins";
|
28 | @import "@material/theme/mixins";
|
29 | @import "./mixins";
|
30 |
|
31 | .mdc-icon-toggle {
|
32 | @include mdc-ripple-surface;
|
33 | @include mdc-ripple-radius-unbounded;
|
34 | @include mdc-states(black);
|
35 | @include mdc-icon-toggle-ink-color(text-primary-on-light);
|
36 |
|
37 | display: flex;
|
38 | position: relative;
|
39 | align-items: center;
|
40 | justify-content: center;
|
41 | box-sizing: border-box;
|
42 | width: 48px;
|
43 | height: 48px;
|
44 | padding: 12px;
|
45 | outline: none;
|
46 | font-size: 1.5rem;
|
47 | cursor: pointer;
|
48 | user-select: none;
|
49 | // For some reason, GPU layer promotion makes ripples look terrible on Chrome
|
50 | /* @alternate */
|
51 | will-change: initial;
|
52 |
|
53 | &::after {
|
54 | position: absolute;
|
55 | border-radius: 50%;
|
56 | opacity: 0;
|
57 | pointer-events: none;
|
58 | content: "";
|
59 | }
|
60 | }
|
61 |
|
62 | .mdc-icon-toggle--disabled {
|
63 | @include mdc-theme-prop(color, text-disabled-on-light);
|
64 |
|
65 | pointer-events: none;
|
66 | }
|
67 |
|
68 | // postcss-bem-linter: end
|