Files
webawesome/packages/webawesome/src/components/option/option.css
Lindsay M 21243729c6 Remove custom properties that are easily styled with CSS parts (#1080)
* progress, components A – C

* left behind tweaks for A – C

* all the rest

* tweaks

* remove 'accent + outlined' appearances and other tweaks

* fix overlooked docs + scouts rule

* re-add `--checked-icon-color` to radio and checkbox

* revert to `--thumb-size`

* fix theme overrides

---------

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2025-06-27 12:48:40 -04:00

81 lines
1.4 KiB
CSS

:host {
display: block;
color: var(--wa-color-text-normal);
-webkit-user-select: none;
user-select: none;
position: relative;
display: flex;
align-items: center;
font: inherit;
padding: 0.5em 1em 0.5em 0.25em;
line-height: var(--wa-line-height-condensed);
transition: fill var(--wa-transition-normal) var(--wa-transition-easing);
cursor: pointer;
}
:host(:focus) {
outline: none;
}
@media (hover: hover) {
:host(:not([disabled], :state(current)):is(:state(hover), :hover)) {
background-color: var(--wa-color-neutral-fill-normal);
color: var(--wa-color-neutral-on-normal);
}
}
:host(:state(current)),
:host([disabled]:state(current)) {
background-color: var(--wa-color-brand-fill-loud);
color: var(--wa-color-brand-on-loud);
opacity: 1;
}
:host([disabled]) {
outline: none;
opacity: 0.5;
cursor: not-allowed;
}
.label {
flex: 1 1 auto;
display: inline-block;
}
.check {
flex: 0 0 auto;
display: flex;
align-items: center;
justify-content: center;
font-size: var(--wa-font-size-smaller);
visibility: hidden;
width: 2em;
}
:host(:state(selected)) .check {
visibility: visible;
}
.start,
.end {
flex: 0 0 auto;
display: flex;
align-items: center;
}
.start::slotted(*) {
margin-inline-end: 0.5em;
}
.end::slotted(*) {
margin-inline-start: 0.5em;
}
@media (forced-colors: active) {
:host(:hover:not([aria-disabled='true'])) {
outline: dashed 1px SelectedItem;
outline-offset: -1px;
}
}