Debian Codegraph @

style/_tabs.scss

raw
1 // Tabbed block container
2 .sd-tab-set {
3 border-radius: 0.125rem;
4 display: flex;
5 flex-wrap: wrap;
6 margin: 1em 0;
7 position: relative;
8
9 // Hide radio buttons
10 > input {
11 opacity: 0;
12 position: absolute;
13
14 // Active tab label
15 &:checked + label {
16 border-color: var(--sd-color-tabs-underline-active);
17 color: var(--sd-color-tabs-label-active);
18
19 // Show tabbed block content
20 + .sd-tab-content {
21 display: block;
22 }
23 }
24
25 &:not(:checked) + label:hover {
26 color: var(--sd-color-tabs-label-hover);
27 border-color: var(--sd-color-tabs-underline-hover);
28 }
29
30 // Focused tab label
31 &:focus + label {
32 outline-style: auto;
33 }
34
35 // Disable focus indicator for pointer devices
36 &:not(.focus-visible) + label {
37 outline: none;
38 -webkit-tap-highlight-color: transparent;
39 }
40 }
41
42 // Tab label
43 > label {
44 border-bottom: 0.125rem solid transparent;
45 margin-bottom: 0;
46 color: var(--sd-color-tabs-label-inactive);
47 border-color: var(--sd-color-tabs-underline-inactive);
48 cursor: pointer;
49 font-size: var(--sd-fontsize-tabs-label);
50 font-weight: 700;
51 padding: 1em 1.25em 0.5em;
52 transition: color 250ms;
53 width: auto;
54 z-index: 1;
55
56 // Hovered label
57 html &:hover {
58 color: var(--sd-color-tabs-label-active);
59 }
60 }
61 }
62
63 .sd-col > .sd-tab-set {
64 width: 100%;
65 }
66
67 // Tabbed block content
68 .sd-tab-content {
69 box-shadow: 0 -0.0625rem var(--sd-color-tabs-overline),
70 0 0.0625rem var(--sd-color-tabs-underline);
71 display: none;
72 order: 99;
73 padding-bottom: 0.75rem;
74 padding-top: 0.75rem;
75 width: 100%;
76
77 > :first-child {
78 margin-top: 0 !important;
79 }
80
81 > :last-child {
82 margin-bottom: 0 !important;
83 }
84
85 // Nested tabs
86 > .sd-tab-set {
87 margin: 0;
88 }
89 }