-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy path_tabs.scss
89 lines (76 loc) · 1.77 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// Tabbed block container
.sd-tab-set {
border-radius: 0.125rem;
display: flex;
flex-wrap: wrap;
margin: 1em 0;
position: relative;
// Hide radio buttons
> input {
opacity: 0;
position: absolute;
// Active tab label
&:checked + label {
border-color: var(--sd-color-tabs-underline-active);
color: var(--sd-color-tabs-label-active);
// Show tabbed block content
+ .sd-tab-content {
display: block;
}
}
&:not(:checked) + label:hover {
color: var(--sd-color-tabs-label-hover);
border-color: var(--sd-color-tabs-underline-hover);
}
// Focused tab label
&:focus + label {
outline-style: auto;
}
// Disable focus indicator for pointer devices
&:not(.focus-visible) + label {
outline: none;
-webkit-tap-highlight-color: transparent;
}
}
// Tab label
> label {
border-bottom: 0.125rem solid transparent;
margin-bottom: 0;
color: var(--sd-color-tabs-label-inactive);
border-color: var(--sd-color-tabs-underline-inactive);
cursor: pointer;
font-size: var(--sd-fontsize-tabs-label);
font-weight: 700;
padding: 1em 1.25em 0.5em;
transition: color 250ms;
width: auto;
z-index: 1;
// Hovered label
html &:hover {
color: var(--sd-color-tabs-label-active);
}
}
}
.sd-col > .sd-tab-set {
width: 100%;
}
// Tabbed block content
.sd-tab-content {
box-shadow: 0 -0.0625rem var(--sd-color-tabs-overline),
0 0.0625rem var(--sd-color-tabs-underline);
display: none;
order: 99;
padding-bottom: 0.75rem;
padding-top: 0.75rem;
width: 100%;
> :first-child {
margin-top: 0 !important;
}
> :last-child {
margin-bottom: 0 !important;
}
// Nested tabs
> .sd-tab-set {
margin: 0;
}
}