Files
sousa-gecko/toolkit/themes/shared/radio.css
T
Emilio Cobos Álvarez a71fc67673 Bug 2008041 - Make XUL disabled / checked attributes html-style boolean attributes. r=desktop-theme-reviewers,tabbrowser-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,translations-reviewers,layout-reviewers,sthompson,nsharpley,robwu,nchevobbe,jwatt,dimi,dao
Much like bug 1979014 did for other attributes (these ones were a bit
harder because there's also native code that looked at them).

Make disabled imply :disabled, and checked imply :checked, which
simplifies the theming code while at it.

Differential Revision: https://phabricator.services.mozilla.com/D277665
2026-01-06 22:02:03 +00:00

79 lines
1.6 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/. */
/* ===== radio.css ===================================================
== Styles used by the XUL radio element.
======================================================================= */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* ::::: radio ::::: */
radio {
align-items: center;
margin: 2px 4px;
@media (-moz-platform: windows) {
padding-block: 1px;
padding-inline: 4px 2px;
}
&[disabled] {
color: GrayText;
}
}
.radio-label {
margin: 0;
}
.radio-check {
appearance: auto;
-moz-default-appearance: radio;
margin: 1px 0;
radiogroup:focus-visible radio[focused] > & {
outline-style: auto;
}
@media (-moz-platform: windows) {
width: 13px;
height: 13px;
}
@media (-moz-platform: linux) {
width: 1.3em;
height: 1.3em;
margin: 2px;
}
@media (-moz-platform: macos) {
width: 1.3em;
height: 1.3em;
margin: 0 1px 1px;
/* vertical-align tells native theming where to snap to. However, this
* doesn't always work reliably because of bug 503833. */
vertical-align: bottom;
}
}
.radio-icon[src] {
margin-inline-end: 2px;
}
@media (-moz-platform: windows) {
.radio-label-box {
margin-inline-start: 2px;
padding-bottom: 1px;
padding-inline-start: 1px;
}
}
@media (-moz-platform: macos) {
.radio-label,
radiogroup {
margin: 1px 0;
}
}