summaryrefslogtreecommitdiffstatshomepage
path: root/src/components/tabs.css
blob: bf17767c7413150d50e86119fdd5eeea52a74681 (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
43
44
45

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

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

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

    border: 1px solid var(--faded-fg);
    background: var(--bg-3);

    transform: translateY(1px);

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

    &:focus {
        outline-bottom: none;
    }
    
    &:active {
        transform: translateY(.2em);
        clip-path: inset(0 0 calc(.2em - 1px) 0);
        border-block-end: 1px solid var(--bg);
    }
    
    &[aria-selected="true"] {
        background: var(--bg-2);
        border-block-end: 1px solid var(--bg);
    }
}

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