Debian Codegraph @

skins/Vector/resources/skins.vector.styles/layouts/toc/unpinned.less

raw
1 // TOC styles when unpinned
2 .mixin-toc-unpinned() {
3 margin-right: 8px;
4
5 .vector-dropdown-content {
6 // Override default dropdown max width
7 max-width: none;
8 }
9
10 // Shared unpinned TOC styles, applies across all unpinned cases (page titlebar, sticky header, floating)
11 .vector-toc {
12 // T316056 Remove TOC menu fixed width and apply min/max-width
13 width: max-content;
14 min-width: 200px;
15 // Collapsed TOC should be smaller than 85% of the content container (51em) and 75vw
16 max-width: ~'min( 0.85 * @{max-width-content-container}, 75vw )'; // min( 51em, 75vw )
17 }
18 }
19
20 // TOC styles when below page title
21 .mixin-toc-below-page-title {
22 position: fixed;
23 top: 12px;
24 left: 12px;
25 margin: 0;
26 z-index: @z-index-dropdown;
27 }
28
29 .client-js {
30 @media ( max-width: @max-width-breakpoint-tablet ) {
31 //
32 // TOC in page titlebar on narrow screens
33 //
34 .vector-page-titlebar-toc {
35 .mixin-toc-unpinned();
36 }
37
38 //
39 // TOC in page titlebar on narrow screens below page title
40 //
41 .vector-below-page-title .vector-page-titlebar-toc {
42 .mixin-toc-below-page-title();
43 }
44 }
45
46 @media ( min-width: @min-width-breakpoint-desktop ) {
47 //
48 // TOC in page titlebar
49 //
50 &.vector-feature-toc-pinned-clientpref-0 body:not( .vector-sticky-header-visible ) {
51 .vector-page-titlebar-toc {
52 .mixin-toc-unpinned();
53 }
54 }
55
56 //
57 // TOC in page titlebar below page title
58 //
59 &.vector-feature-toc-pinned-clientpref-0 body:not( .vector-sticky-header-visible ).vector-below-page-title {
60 .vector-page-titlebar-toc {
61 .mixin-toc-below-page-title();
62 }
63 }
64
65 //
66 // TOC in sticky header
67 //
68 &.vector-feature-toc-pinned-clientpref-0 .vector-sticky-header-visible {
69 .vector-sticky-header-toc {
70 .mixin-toc-unpinned();
71 }
72 }
73 }
74 }
75
76 .client-nojs {
77 //
78 // No-JS TOC in page titlebar
79 //
80 &.vector-feature-toc-pinned-clientpref-0 {
81 .vector-page-titlebar-toc {
82 .mixin-toc-unpinned();
83 }
84 }
85
86 //
87 // Applies simplified TOC styles to No-JS pinned TOC on narrow viewports
88 //
89 @media ( max-width: @max-width-breakpoint-tablet ) {
90 &.vector-feature-toc-pinned-clientpref-1 {
91 .vector-sticky-pinned-container {
92 position: static;
93 }
94
95 #vector-toc-pinned-container {
96 max-height: 200px;
97 }
98 }
99 }
100 }