mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
88 lines
1.4 KiB
CSS
88 lines
1.4 KiB
CSS
:host {
|
|
--symbol-color: var(--wa-color-neutral-fill-normal);
|
|
--symbol-color-active: var(--wa-color-yellow-70);
|
|
--symbol-size: var(--wa-font-size-l);
|
|
--symbol-spacing: var(--wa-space-3xs);
|
|
|
|
display: inline-flex;
|
|
}
|
|
|
|
.rating {
|
|
position: relative;
|
|
display: inline-flex;
|
|
border-radius: var(--wa-border-radius-s);
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.rating:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.rating:focus-visible {
|
|
outline: var(--wa-focus-ring);
|
|
outline-offset: var(--wa-focus-ring-offset);
|
|
}
|
|
|
|
.symbols {
|
|
display: inline-flex;
|
|
position: relative;
|
|
font-size: var(--symbol-size);
|
|
line-height: 0;
|
|
color: var(--symbol-color);
|
|
white-space: nowrap;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.symbols > * {
|
|
padding: var(--symbol-spacing);
|
|
}
|
|
|
|
.symbol--active,
|
|
.partial--filled {
|
|
color: var(--symbol-color-active);
|
|
}
|
|
|
|
.partial-symbol-container {
|
|
position: relative;
|
|
}
|
|
|
|
.partial--filled {
|
|
position: absolute;
|
|
top: var(--symbol-spacing);
|
|
left: var(--symbol-spacing);
|
|
}
|
|
|
|
.symbol {
|
|
transition: scale var(--wa-transition-normal) var(--wa-transition-easing);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.symbol--hover {
|
|
scale: 1.2;
|
|
}
|
|
|
|
.rating--disabled .symbols,
|
|
.rating--readonly .symbols {
|
|
cursor: default;
|
|
}
|
|
|
|
.rating--disabled .symbol--hover,
|
|
.rating--readonly .symbol--hover {
|
|
scale: none;
|
|
}
|
|
|
|
.rating--disabled {
|
|
opacity: 0.5;
|
|
}
|
|
|
|
.rating--disabled .symbols {
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* Forced colors mode */
|
|
@media (forced-colors: active) {
|
|
.symbol--active {
|
|
color: SelectedItem;
|
|
}
|
|
}
|