Files
DeviceManager/src/lib/style/form/_button.scss
Aleksandr Iushmanov 63d0ad7ae8 Use modern compiler for css processing in vite (to remove SASS 2.0.0 warnings on deprecated JS API usage); (#180)
Resolve some of SASS deprecation warnings;
Add note to readme about icons generation
2025-04-08 11:51:36 +02:00

107 lines
1.7 KiB
SCSS

a {
text-decoration: none;
}
a,
label:has(input),
button {
cursor: pointer;
display: flex;
gap: 4px;
align-items: center;
justify-content: center;
width: max-content;
height: 48px;
padding-block: 8px;
padding-inline: 16px;
font-family: inherit;
font-weight: 600;
border-radius: 32px;
transition: all 250ms ease;
@media not (forced-colors: active) {
color: currentcolor;
background: transparent;
border: none;
&.primary {
color: var(--md-sys-color-on-primary);
background: var(--md-sys-color-primary);
}
}
@media (forced-colors: active) {
border: 1px solid ButtonBorder;
color: ButtonText;
}
&.icon {
display: inline-flex;
aspect-ratio: 1;
padding-block: 0;
padding-inline: 0;
font-size: 24px;
border-radius: 50%;
@media (forced-colors: active) {
padding: 2px;
margin: 2px;
}
}
&.compact {
height: 32px;
}
}
@media not (forced-colors: active) {
label:has(input):hover,
.button:hover:not(:active),
a:hover:not(:active),
button:hover:not(:active) {
filter: brightness(70%);
transition: filter 250ms ease;
&:has(:checked),
&.active {
filter: brightness(120%);
}
&:disabled,
&.disabled {
opacity: 0.5;
filter: none;
}
}
}
@media (forced-colors: active) {
label:has(input) .button,
a button {
&:hover {
color: ActiveText;
}
&.active,
&:active {
color: SelectedItemText;
background: SelectedItem;
}
}
}
.disabled,
:disabled {
pointer-events: none;
@media not (forced-colors: active) {
opacity: 0.5;
}
@media (forced-colors: active) {
color: GrayText;
}
}