blob: 94922eb9638d3c1fd74c454b1b8de14d31e03f58 (
plain)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* A radiogroup styled to hide the radio buttons
* and present tab-like labels as buttons
*/
.toggle-group {
display: inline-flex;
}
.toggle-group-label {
display: inline-flex;
align-items: center;
margin: 0;
padding: 6px 10px;
background-color: var(--in-content-button-background);
}
.toggle-group-input {
position: absolute;
inset-inline-start: -100px;
}
.toggle-group-label-iconic::before {
width: 16px;
height: 16px;
margin-inline-end: 5px;
-moz-context-properties: fill;
fill: currentColor;
}
.toggle-group-label:first-of-type {
border-start-start-radius: 4px;
border-end-start-radius: 4px;
}
.toggle-group-label:last-of-type {
border-start-end-radius: 4px;
border-end-end-radius: 4px;
}
.toggle-group-input:disabled + .toggle-group-label {
opacity: 0.4;
}
.toggle-group-input:enabled + .toggle-group-label:hover {
background-color: var(--in-content-button-background-hover);
color: var(--in-content-button-text-color-hover);
}
.toggle-group-input:enabled + .toggle-group-label:hover:active {
background-color: var(--in-content-button-background-active);
color: var(--in-content-button-text-color-active);
}
.toggle-group-input:focus-visible + .toggle-group-label {
outline: var(--in-content-focus-outline);
outline-offset: var(--in-content-focus-outline-offset);
z-index: 1;
}
.toggle-group-input:checked + .toggle-group-label {
background-color: var(--in-content-primary-button-background);
color: var(--in-content-primary-button-text-color);
}
.toggle-group-input:enabled:checked + .toggle-group-label:hover {
background-color: var(--in-content-primary-button-background-hover);
color: var(--in-content-primary-button-text-color-hover);
}
.toggle-group-input:enabled:checked + .toggle-group-label:hover:active {
background-color: var(--in-content-primary-button-background-active);
color: var(--in-content-primary-button-text-color-active);
}
|