forked from eslint/eslint
/
tabs.scss
63 lines (55 loc) · 1.37 KB
/
tabs.scss
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
.c-tabs {
pre {
margin-top: 0;
margin-block-start: 0;
}
}
.c-tabs__tablist {
.js-tabs & {
display: flex;
justify-content: start;
}
}
.c-tabs__tab {
background: none;
border: none;
margin: 0;
color: inherit;
font: inherit;
cursor: pointer;
line-height: inherit;
font-weight: 500;
font-size: var(--step-0);
display: inline-flex;
padding: .75rem 1.125rem;
align-items: center;
justify-content: center;
border-radius: var(--border-radius) var(--border-radius) 0 0;
transition: background-color .2s linear, border-color .2s linear;
&:hover {
color: var(--link-color);
}
&[aria-selected="true"] {
color: var(--link-color);
background-color: var(--lightest-background-color);
}
}
.c-tabs__tabpanel {
margin-bottom: 2rem;
margin-block-end: 2rem;
background-color: var(--lightest-background-color);
border-radius: 0 var(--border-radius) var(--border-radius) var(--border-radius);
.js-tabs & {
margin-bottom: 0;
margin-block-end: 0;
}
}
.c-tabs__tabpanel__title {
margin-bottom: 1.5rem;
margin-block-end: 1.5rem;
}
// when the js is enabled, the tabpanels are labelled by their tabs
// you may choose to hide or keep the headings inside of them visible
.js-tabs .c-tabs__tabpanel__title {
display: none;
}