2022-01-11 19:52:26 +00:00
|
|
|
@import '../../common/variables.less';
|
|
|
|
|
2022-12-20 22:58:44 +00:00
|
|
|
// FIXME: Remove all .sidebar-toc selectors after I5b9228380f5c4674ef424d33127a5cb4010822da is in prod for 5 days
|
|
|
|
.sidebar-toc,
|
|
|
|
.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-01-09 20:15:42 +00:00
|
|
|
padding: 20px 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
|
|
|
.sidebar-toc-numb,
|
|
|
|
.vector-toc-numb {
|
2022-01-11 19:52:26 +00:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2022-12-20 22:58:44 +00:00
|
|
|
.sidebar-toc-toggle,
|
|
|
|
.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
|
|
|
.sidebar-toc-link,
|
|
|
|
.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.
|
|
|
|
.sidebar-toc-list-item-active,
|
|
|
|
.sidebar-toc-level-1-active:not( .sidebar-toc-list-item-expanded ),
|
2022-12-20 22:58:44 +00:00
|
|
|
.sidebar-toc-list-item-active.sidebar-toc-level-1-active,
|
|
|
|
.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 {
|
|
|
|
> .sidebar-toc-link,
|
|
|
|
> .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
|
|
|
.sidebar-toc-text,
|
|
|
|
.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
|
|
|
.sidebar-toc-level-1-active:not( .sidebar-toc-list-item-active ) > .sidebar-toc-link,
|
|
|
|
.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
|
|
|
.sidebar-toc-text,
|
|
|
|
.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-03-17 18:35:43 +00:00
|
|
|
.sidebar-toc-contents,
|
2022-12-20 22:58:44 +00:00
|
|
|
.sidebar-toc-list,
|
|
|
|
.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
|
|
|
.sidebar-toc-list-item,
|
|
|
|
.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
|
|
|
&.sidebar-toc-level-1,
|
|
|
|
&.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 .sidebar-toc,
|
|
|
|
.client-js .vector-toc {
|
|
|
|
.sidebar-toc-level-1 .sidebar-toc-list-item,
|
|
|
|
.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
|
|
|
.sidebar-toc-level-1.sidebar-toc-list-item-expanded .sidebar-toc-list-item,
|
|
|
|
.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
|
|
|
.sidebar-toc-toggle,
|
|
|
|
.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
|
|
|
.sidebar-toc-level-1.sidebar-toc-list-item-expanded .sidebar-toc-toggle,
|
|
|
|
.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 .sidebar-toc .sidebar-toc-toggle,
|
|
|
|
.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 .sidebar-toc .sidebar-toc-toggle,
|
|
|
|
.client-js body.rtl .vector-toc .vector-toc-toggle {
|
2022-05-29 19:43:20 +00:00
|
|
|
transform: rotate( 90deg );
|
|
|
|
}
|