gecko-dev/toolkit/components/printing/content/toggle-group.css

97 lines
2.4 KiB
CSS

/* 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;
}
@media not (-moz-proton) {
.toggle-group-label:first-of-type {
border-start-start-radius: 2px;
border-end-start-radius: 2px;
}
.toggle-group-label:last-of-type {
border-start-end-radius: 2px;
border-end-end-radius: 2px;
}
} /*** END !proton ***/
.toggle-group-input:disabled + .toggle-group-label {
opacity: 0.4;
}
@media not (-moz-proton) {
.toggle-group-input:disabled + .toggle-group-label {
opacity: 0.7;
}
} /*** END !proton ***/
.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-hover);
}
.toggle-group-input:-moz-focusring + .toggle-group-label {
outline: 2px solid var(--in-content-focus-outline-color);
outline-offset: 2px;
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-hover);
}