PluginProbe
Code Snippets / 4.0.0-beta.1
Code Snippets v4.0.0-beta.1
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
code-snippets / css / common / _switch.scss

_switch.scss in Code Snippets 4.0.0-beta.1, at css/common/_switch.scss

115 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 @use 'theme';
2
3 $off-color: #789;
4
5 .snippet-execution-button,
6 .snippet-activation-switch,
7 input[type='checkbox']='checkbox'].switch {
8 display: block;
9 position: relative;
10 }
11
12 .snippet-activation-switch,
13 input[type='checkbox']='checkbox'].switch {
14 appearance: none;
15 outline: 0;
16 cursor: pointer;
17 margin: 0;
18 inline-size: 32px;
19 block-size: 19px;
20 border-radius: 34px;
21 text-align: start;
22 border: 1px solid $off-color;
23 box-sizing: border-box;
24
25 &::before {
26 transition: all .1s;
27 content: '';
28 block-size: 13px;
29 inline-size: 13px;
30 display: inline-block;
31 background-color: $off-color;
32 border-radius: 50%;
33 margin: 2px;
34
35 @media (prefers-reduced-motion: reduce) {
36 transition-duration: 0.01s;
37 }
38 }
39 }
40
41 .active-snippet .snippet-activation-switch,
42 input[type='checkbox']='checkbox'].switch:checked {
43 background-color: #0073aa;
44
45 &::before {
46 background-color: white;
47 transform: translateX(calc(100% * var(--cs-direction-multiplier)));
48 }
49 }
50
51 .erroneous-snippet .snippet-activation-switch::before {
52 content: '!';
53 transform: translateX(calc(50% * var(--cs-direction-multiplier)));
54 text-align: center;
55 font-weight: bold;
56 line-height: 1;
57 color: #1d2327;
58 }
59
60 a.snippet-condition-count {
61 border-radius: 50%;
62 border: 1.8px solid currentcolor;
63 block-size: 29px;
64 inline-size: 29px;
65 display: flex;
66 justify-content: center;
67 align-items: center;
68 box-sizing: border-box;
69
70 .inactive-snippet & {
71 color: #ccc;
72 }
73
74 .active-snippet & {
75 font-weight: bold;
76 color: theme.$accent;
77 }
78 }
79
80 .snippet-execution-button {
81 margin-inline-start: 11px;
82 margin-block-start: 9px;
83 inline-size: 0;
84 block-size: 0;
85 border-block: 9px solid transparent;
86 border-inline-start: 10px solid #ccc;
87
88 &::before {
89 content: '';
90 position: absolute;
91 inset: -14px -8px -14px -21px;
92 border-radius: 50%;
93 border: 1.8px solid #ccc;
94 z-index: 2;
95 }
96
97 &:hover {
98 border-inline-start-color: theme.$accent;
99 transition: border-inline-start-color 0.6s;
100
101 &::before {
102 border-color: theme.$accent;
103 transition: border-color 0.6s;
104 }
105
106 @media (prefers-reduced-motion: reduce) {
107 transition-duration: 0.01s;
108
109 &::before {
110 transition-duration: 0.01s;
111 }
112 }
113 }
114 }
115