Debian Codegraph @

docs/src/scss/extensions/_tabbed.scss

raw
1 @use "../utilities/break";
2 @use "../utilities/convert";
3
4 .md-typeset .tabbed-control button{
5 &:hover {
6 color: var(--md-default-bg-color);
7 background: var(--md-accent-fg-color);
8 }
9 }
10
11 .md-typeset .tabbed-control--next button {
12 &:hover {
13 color: var(--md-default-bg-color);
14 background: var(--md-accent-fg-color);
15 }
16 }
17
18 .js .md-typeset .tabbed-labels::before {
19 background-color: var(--md-accent-fg-color);
20 }
21
22 /* Style code blocks to fill full tab,
23 but otherwise, pad content. */
24 .md-typeset {
25 .tabbed-alternate {
26 &.tabbed-set .tabbed-control {
27 width: convert.px2rem(40px);
28
29 &[hidden] {
30 width: convert.px2rem(24px);
31 opacity: 0;
32 }
33 }
34
35 &.tabbed-set > .tabbed-content > .tabbed-block {
36 padding: 0 convert.px2rem(12px);
37
38 > {
39 pre,
40 .codehilite,
41 .codehilitetable,
42 .highlight,
43 .highlighttable {
44
45 &:first-child {
46 margin-top: convert.px2em(15px);
47
48 code {
49 border-top-left-radius: convert.px2rem(9.6px);
50 border-top-right-radius: convert.px2rem(9.6px);
51 }
52 }
53
54 &:only-child {
55 margin-top: 0;
56 margin-right: convert.px2rem(-24px);
57 margin-left: convert.px2rem(-24px);
58 padding-right: convert.px2rem(12px);
59 padding-left: convert.px2rem(12px);
60 code {
61 border-top-left-radius: 0;
62 border-top-right-radius: 0;
63 }
64
65 span.filename {
66 margin-top: 0;
67 }
68 }
69 }
70
71 .collapse-code:only-child {
72 margin-top: 0;
73
74 margin-right: convert.px2rem(-24px);
75 margin-left: convert.px2rem(-24px);
76 padding-right: convert.px2rem(12px);
77 padding-left: convert.px2rem(12px);
78
79 pre,
80 .codehilite,
81 .codehilitetable,
82 .highlight,
83 .highlighttable {
84 code {
85 border-top-left-radius: 0;
86 border-top-right-radius: 0;
87 }
88 }
89 }
90
91 diagram-div:only-child {
92 margin-right: convert.px2rem(-24px);
93 margin-left: convert.px2rem(-24px);
94 padding-right: convert.px2rem(12px);
95 padding-left: convert.px2rem(12px);
96 }
97 }
98 }
99 }
100 }
101
102 /* Ignore mobile overflow styling that extends the tab bar */
103 @include break.break-to-device(mobile) {
104 [dir=ltr] .md-content__inner > .tabbed-set .tabbed-labels {
105 padding-left: 0;
106 }
107
108 .md-content__inner > .tabbed-set .tabbed-labels {
109 max-width: 100%;
110 margin: 0;
111 padding-inline-start: 0;
112 scroll-padding-inline-start: 0;
113
114 &::after {
115 padding-inline-end: 0;
116 content: none;
117 }
118
119 // Tabbed control previous
120 ~ .tabbed-control--prev {
121 margin-inline-start: 0;
122 padding-inline-start: 0;
123 }
124
125 // Tabbed control next
126 ~ .tabbed-control--next {
127 margin-inline-end: 0;
128 padding-inline-end: 0;
129 }
130 }
131 }