2022-01-11 19:52:26 +00:00
|
|
|
@import '../../common/variables.less';
|
|
|
|
|
2022-12-20 22:58:44 +00:00
|
|
|
.vector-toc {
|
2022-03-17 18:35:43 +00:00
|
|
|
max-height: 75vh;
|
2022-05-12 20:17:03 +00:00
|
|
|
box-sizing: border-box;
|
2022-09-09 16:22:07 +00:00
|
|
|
overflow-y: auto;
|
|
|
|
overflow-x: hidden;
|
2022-07-20 01:18:07 +00:00
|
|
|
background-color: @background-color-page-container;
|
2022-01-11 19:52:26 +00:00
|
|
|
|
2022-12-22 23:10:29 +00:00
|
|
|
.vector-feature-page-tools-disabled & {
|
2023-02-04 02:01:56 +00:00
|
|
|
padding: @padding-top-tabs 12px 20px 27px;
|
2022-12-22 23:10:29 +00:00
|
|
|
|
|
|
|
.vector-toc-pinnable-header {
|
|
|
|
// Override default pinnable header styles
|
|
|
|
padding: 0 0 12px 0;
|
|
|
|
border: 0;
|
|
|
|
line-height: initial;
|
|
|
|
}
|
2022-01-11 19:52:26 +00:00
|
|
|
}
|
|
|
|
|
2022-11-14 18:24:43 +00:00
|
|
|
.vector-pinnable-header-label {
|
|
|
|
// Override heading element styles in elements.less
|
|
|
|
overflow: unset;
|
|
|
|
}
|
|
|
|
|
2022-12-20 22:58:44 +00:00
|
|
|
.vector-toc-numb {
|
2022-01-11 19:52:26 +00:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2022-12-20 22:58:44 +00:00
|
|
|
.vector-toc-toggle {
|
2022-07-08 17:51:28 +00:00
|
|
|
// For no-js users, toggling is disabled and icon is hidden
|
|
|
|
display: none;
|
|
|
|
position: absolute;
|
|
|
|
top: 1px; // visually center icon
|
2022-12-20 22:58:44 +00:00
|
|
|
left: ~'calc( -1 * @{size-toc-subsection-toggle-icon} - 1px )'; // leaves 6px between icon + text
|
|
|
|
width: @size-toc-subsection-toggle-icon; // ~22px @ 12
|
|
|
|
height: @size-toc-subsection-toggle-icon;
|
2022-07-08 17:51:28 +00:00
|
|
|
font-size: 0.75em; // reduces size of toggle icon to 12px @ 16
|
|
|
|
transition: @transition-duration-base;
|
2022-09-20 21:32:53 +00:00
|
|
|
color: transparent;
|
2022-07-08 17:51:28 +00:00
|
|
|
cursor: pointer;
|
2022-12-22 23:10:29 +00:00
|
|
|
|
|
|
|
.vector-feature-page-tools-enabled & {
|
|
|
|
// Vertically center the icon with the text
|
|
|
|
margin-top: 2px;
|
|
|
|
}
|
2022-07-08 17:51:28 +00:00
|
|
|
}
|
|
|
|
|
2022-12-20 22:58:44 +00:00
|
|
|
.vector-toc-link {
|
2022-05-02 18:33:59 +00:00
|
|
|
word-break: break-word;
|
2022-04-28 18:07:34 +00:00
|
|
|
color: @color-link;
|
2022-07-18 15:28:09 +00:00
|
|
|
display: block;
|
2022-04-28 18:07:34 +00:00
|
|
|
}
|
|
|
|
|
2022-09-20 21:32:53 +00:00
|
|
|
// Highlight and bold active sections, active top sections that are unexpanded
|
|
|
|
// and active top sections that are the only active element.
|
2022-12-20 22:58:44 +00:00
|
|
|
.vector-toc-list-item-active,
|
|
|
|
.vector-toc-level-1-active:not( .vector-toc-list-item-expanded ),
|
|
|
|
.vector-toc-list-item-active.vector-toc-level-1-active {
|
|
|
|
> .vector-toc-link {
|
2022-09-20 21:32:53 +00:00
|
|
|
// Highlight active section
|
|
|
|
color: @color-base;
|
|
|
|
font-weight: bold;
|
|
|
|
|
2022-12-20 22:58:44 +00:00
|
|
|
.vector-toc-text {
|
2022-09-20 21:32:53 +00:00
|
|
|
// Increase width to prevent line wrapping due to bold text
|
|
|
|
// Avoid applying on link element to avoid focus indicator changing size
|
2023-01-09 20:15:42 +00:00
|
|
|
width: ~'calc( 100% + @{padding-horizontal-dropdown-menu-item} )';
|
2022-09-20 21:32:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Highlight active top sections that contain an active section
|
2022-12-20 22:58:44 +00:00
|
|
|
.vector-toc-level-1-active:not( .vector-toc-list-item-active ) > .vector-toc-link {
|
2022-07-08 17:51:28 +00:00
|
|
|
color: @color-base;
|
|
|
|
}
|
|
|
|
|
2022-12-20 22:58:44 +00:00
|
|
|
.vector-toc-text {
|
2023-01-06 17:07:29 +00:00
|
|
|
.vector-feature-page-tools-disabled & {
|
|
|
|
padding: 4px 0;
|
|
|
|
}
|
2022-12-22 23:10:29 +00:00
|
|
|
|
|
|
|
.vector-feature-page-tools-enabled & {
|
|
|
|
// Match .mixin-vector-dropdown-menu-item() vertical padding
|
|
|
|
padding: @padding-vertical-dropdown-menu-item 0;
|
|
|
|
}
|
2022-01-11 19:52:26 +00:00
|
|
|
}
|
|
|
|
|
2022-12-20 22:58:44 +00:00
|
|
|
.vector-toc-contents,
|
|
|
|
.vector-toc-list {
|
2022-01-11 19:52:26 +00:00
|
|
|
margin: 0;
|
|
|
|
list-style: none;
|
2023-01-06 17:07:29 +00:00
|
|
|
|
|
|
|
.vector-feature-page-tools-disabled & {
|
|
|
|
line-height: 18px;
|
|
|
|
}
|
2022-02-07 19:20:17 +00:00
|
|
|
}
|
2022-01-11 19:52:26 +00:00
|
|
|
|
2022-12-20 22:58:44 +00:00
|
|
|
.vector-toc-list-item {
|
2022-02-07 19:20:17 +00:00
|
|
|
display: block;
|
|
|
|
position: relative;
|
|
|
|
list-style-type: none;
|
2022-04-28 18:21:52 +00:00
|
|
|
padding-left: 8px;
|
2022-01-11 19:52:26 +00:00
|
|
|
|
2022-12-22 23:10:29 +00:00
|
|
|
.vector-feature-page-tools-enabled & {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
2022-12-20 22:58:44 +00:00
|
|
|
&.vector-toc-level-1 {
|
2022-07-08 17:51:28 +00:00
|
|
|
padding-left: 0;
|
|
|
|
}
|
|
|
|
|
2022-02-07 19:20:17 +00:00
|
|
|
a {
|
|
|
|
font-size: @font-size-base;
|
|
|
|
}
|
|
|
|
}
|
2022-01-11 19:52:26 +00:00
|
|
|
}
|
|
|
|
|
2022-04-21 16:51:47 +00:00
|
|
|
// Collapse ToC sections by default, excluding no-js
|
2022-12-20 22:58:44 +00:00
|
|
|
.client-js .vector-toc {
|
|
|
|
.vector-toc-level-1 .vector-toc-list-item {
|
2022-04-21 16:51:47 +00:00
|
|
|
display: none;
|
|
|
|
}
|
2022-02-07 19:20:17 +00:00
|
|
|
|
2022-12-20 22:58:44 +00:00
|
|
|
.vector-toc-level-1.vector-toc-list-item-expanded .vector-toc-list-item {
|
2022-04-21 16:51:47 +00:00
|
|
|
display: block;
|
|
|
|
}
|
2022-02-07 19:20:17 +00:00
|
|
|
|
2022-12-20 22:58:44 +00:00
|
|
|
.vector-toc-toggle {
|
2022-04-21 16:51:47 +00:00
|
|
|
display: block;
|
|
|
|
}
|
2022-02-07 19:20:17 +00:00
|
|
|
|
2022-12-20 22:58:44 +00:00
|
|
|
.vector-toc-level-1.vector-toc-list-item-expanded .vector-toc-toggle {
|
2022-04-21 16:51:47 +00:00
|
|
|
transform: rotate( 0deg );
|
2022-02-07 19:20:17 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-17 22:58:44 +00:00
|
|
|
|
2022-12-20 22:58:44 +00:00
|
|
|
.client-js body.ltr .vector-toc .vector-toc-toggle {
|
2022-05-29 19:43:20 +00:00
|
|
|
transform: rotate( -90deg );
|
|
|
|
}
|
|
|
|
|
2022-12-20 22:58:44 +00:00
|
|
|
.client-js body.rtl .vector-toc .vector-toc-toggle {
|
2022-05-29 19:43:20 +00:00
|
|
|
transform: rotate( 90deg );
|
|
|
|
}
|