aboutsummaryrefslogtreecommitdiff
path: root/.config/ags/style/mixins/a11y-button.scss
blob: 00b24c61498cdfaea42fdb645d9714acb297323e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@import './button';

@mixin accs-button($flat: false, $reactive: true) {
    @include unset;
    color: $fg;

    >* {
        border-radius: $radius;
        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-bg;
            }
        }
    }
}