refactor: make the whole thing more generic

This commit is contained in:
2024-04-02 16:28:57 +02:00
parent 7b648e1955
commit 651f3ad808
193 changed files with 763 additions and 521 deletions

View File

@@ -0,0 +1,45 @@
@import "./button";
@mixin accs-button($flat: false, $reactive: true) {
@include button($flat: true, $reactive: false, $focusable: false);
color: $fg-color;
> * {
border-radius: $radii;
transition: $transition;
@if $flat {
background-color: transparent;
box-shadow: none;
} @else {
background-color: $widget-bg;
box-shadow: inset 0 0 0 $border-width $border-color;
}
}
@if $reactive {
&:focus > *,
&.focused > * {
@include button-focus;
}
&:hover > * {
@include button-hover;
}
&:active,
&.active,
&.on,
&:checked {
> * {
@include button-active;
}
&:hover > * {
box-shadow:
inset 0 0 0 $border-width $border-color,
inset 0 0 0 99px $hover;
}
}
}
}