summaryrefslogtreecommitdiffstatshomepage
path: root/src/components/tabs.css
blob: e5245180c6e083d244551f67a6e6b49fa9b0f8cf (plain) (blame)
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

[role="tablist"] {
    display: flex;
    gap: .5ch;
    scrollbar-width: thin;
}

[role="tab"][role="tab"] {
    all: initial;

    padding: 0 calc(var(--rhythm) / 4);
    margin: 0;
    min-height: var(--rhythm);

    border: solid var(--accent);
    border-width: 1px 1px 0 1px;
    border-block-end-color: transparent;
    background: var(--bg-3);

    border-start-start-radius: .4em;
    border-start-end-radius: .4em;

    &:focus {
        outline-bottom: none;
    }
    
    &:active, &[aria-selected="true"] {
        transform: none;
        bottom: -1px;
        position: relative;
        background: var(--bg-2);
        border-block-end: 1px solid var(--bg-2);
    }
}

[role="tabpanel"] {
    @mixin box;
    margin-block-start: 0;
    border-start-start-radius: 0;
    border-start-end-radius: 0;
    z-index: 1;
}