gecko-dev/toolkit/content/widgets/moz-checkbox/moz-checkbox.css
Mark Striemer 47c09f09de Bug 1894487 - Support iconSrc on moz-checkbox r=reusable-components-reviewers,hjones
This is essentially the changes from hjones' patch for moz-radio in
Bug 1894501 but with radio references replaced with checkbox.

Differential Revision: https://phabricator.services.mozilla.com/D212197
2024-05-31 20:35:57 +00:00

45 lines
929 B
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/. */
:host {
display: flex;
flex-direction: column;
gap: var(--space-xxsmall);
}
label {
display: flex;
gap: var(--space-small);
align-items: start;
}
input {
min-width: var(--checkbox-size);
height: var(--checkbox-size);
accent-color: var(--color-accent-primary);
font-size: inherit;
}
input,
.icon {
margin: calc((1lh - var(--checkbox-size)) / 2) 0;
}
.label-content {
display: flex;
position: relative;
}
.icon {
-moz-context-properties: fill, fill-opacity, stroke;
fill: currentColor;
stroke: currentColor;
width: var(--icon-size-default);
height: var(--icon-size-default);
position: absolute;
& + .text {
text-indent: calc(var(--checkbox-size) + var(--space-small));
}
}