2022-01-11 19:52:26 +00:00
|
|
|
@import '../../common/variables.less';
|
|
|
|
|
2022-03-17 18:35:43 +00:00
|
|
|
@fade-height: 40px;
|
2022-04-08 22:33:59 +00:00
|
|
|
@vertical-padding: 20px;
|
|
|
|
@toggle-icon-size: 1.834em;
|
2022-01-11 19:52:26 +00:00
|
|
|
|
|
|
|
.sidebar-toc {
|
2022-03-17 22:58:44 +00:00
|
|
|
display: none;
|
2022-02-21 23:21:24 +00:00
|
|
|
width: @width-sidebar;
|
2022-03-17 18:35:43 +00:00
|
|
|
max-height: 75vh;
|
2022-04-28 18:21:52 +00:00
|
|
|
padding: @vertical-padding 12px @vertical-padding 32px;
|
2022-02-21 23:21:24 +00:00
|
|
|
.box-sizing( border-box );
|
2022-01-11 19:52:26 +00:00
|
|
|
overflow: auto;
|
2022-02-21 23:21:24 +00:00
|
|
|
background-color: @border-color-sidebar;
|
2022-01-11 19:52:26 +00:00
|
|
|
|
2022-04-28 18:21:52 +00:00
|
|
|
@media ( min-width: @width-breakpoint-desktop-wide ) {
|
|
|
|
width: @width-sidebar-wide;
|
|
|
|
padding-right: 8px;
|
|
|
|
}
|
|
|
|
|
2022-01-11 19:52:26 +00:00
|
|
|
.sidebar-toc-header {
|
|
|
|
padding-bottom: 12px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.sidebar-toc-title {
|
2022-04-28 18:07:34 +00:00
|
|
|
color: @color-base--subtle;
|
|
|
|
font-size: @font-size-base;
|
2022-01-11 19:52:26 +00:00
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
border: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.sidebar-toc-numb {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2022-04-28 18:07:34 +00:00
|
|
|
.sidebar-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-01-11 19:52:26 +00:00
|
|
|
.sidebar-toc-text {
|
2022-04-28 18:21:52 +00:00
|
|
|
padding: 4px 0;
|
2022-01-11 19:52:26 +00:00
|
|
|
}
|
|
|
|
|
2022-03-17 18:35:43 +00:00
|
|
|
.sidebar-toc-contents,
|
2022-02-07 19:20:17 +00:00
|
|
|
.sidebar-toc-list {
|
2022-01-11 19:52:26 +00:00
|
|
|
margin: 0;
|
|
|
|
list-style: none;
|
|
|
|
line-height: 18px;
|
2022-02-07 19:20:17 +00:00
|
|
|
}
|
2022-01-11 19:52:26 +00:00
|
|
|
|
2022-03-17 18:35:43 +00:00
|
|
|
.sidebar-toc-contents {
|
2022-04-08 22:33:59 +00:00
|
|
|
padding-bottom: ~'calc( @{vertical-padding} / 2 )';
|
2022-03-17 18:35:43 +00:00
|
|
|
}
|
|
|
|
|
2022-02-07 19:20:17 +00:00
|
|
|
.sidebar-toc-list-item {
|
|
|
|
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-02-07 19:20:17 +00:00
|
|
|
a {
|
|
|
|
font-size: @font-size-base;
|
|
|
|
}
|
|
|
|
}
|
2022-01-11 19:52:26 +00:00
|
|
|
|
2022-02-07 19:20:17 +00:00
|
|
|
.sidebar-toc-list-item.sidebar-toc-level-1 {
|
|
|
|
padding-left: 0;
|
2022-01-11 19:52:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-17 18:35:43 +00:00
|
|
|
// Hide scrollbar but allow scrolling for Chrome, Safari, and Opera
|
|
|
|
.sidebar-toc::-webkit-scrollbar {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
// T302076 Add scrollable indicator as fade
|
2022-04-06 21:40:16 +00:00
|
|
|
.sidebar-toc:after {
|
2022-03-17 18:35:43 +00:00
|
|
|
content: '';
|
|
|
|
display: block;
|
2022-04-06 21:40:16 +00:00
|
|
|
position: absolute;
|
2022-04-08 22:33:59 +00:00
|
|
|
bottom: 0;
|
2022-05-04 16:21:19 +00:00
|
|
|
left: @margin-start-sidebar-content; // T306893: Ensure scrollable indicator is contained in the TOC
|
|
|
|
right: @border-width-base; // Ensure scrollable indicator doesn't cover border/scrollbar
|
2022-03-17 18:35:43 +00:00
|
|
|
height: @fade-height;
|
|
|
|
background: linear-gradient( rgba( 255, 255, 255, 0 ), @border-color-sidebar );
|
|
|
|
pointer-events: none; // Make the link below the fade clickable
|
|
|
|
}
|
|
|
|
|
2022-02-07 19:20:17 +00:00
|
|
|
// Highlight active section
|
|
|
|
.sidebar-toc .sidebar-toc-list-item-active > .sidebar-toc-link {
|
2022-04-28 18:07:34 +00:00
|
|
|
color: @color-base;
|
2022-02-07 19:20:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.sidebar-toc .sidebar-toc-toggle {
|
2022-02-15 22:43:04 +00:00
|
|
|
// For no-js users, toggling is disabled and icon is hidden
|
2022-02-07 19:20:17 +00:00
|
|
|
display: none;
|
2022-02-15 22:43:04 +00:00
|
|
|
cursor: pointer;
|
2022-02-07 19:20:17 +00:00
|
|
|
}
|
|
|
|
|
2022-04-21 16:51:47 +00:00
|
|
|
// Collapse ToC sections by default, excluding no-js
|
|
|
|
.client-js .sidebar-toc {
|
|
|
|
.sidebar-toc-level-1 .sidebar-toc-list-item {
|
|
|
|
display: none;
|
|
|
|
}
|
2022-02-07 19:20:17 +00:00
|
|
|
|
2022-04-21 16:51:47 +00:00
|
|
|
.sidebar-toc-level-1.sidebar-toc-list-item-expanded .sidebar-toc-list-item {
|
|
|
|
display: block;
|
|
|
|
}
|
2022-02-07 19:20:17 +00:00
|
|
|
|
2022-04-21 16:51:47 +00:00
|
|
|
.sidebar-toc-toggle {
|
|
|
|
position: absolute;
|
|
|
|
top: 1px; // visually center icon
|
|
|
|
left: ~'calc( -1 * @{toggle-icon-size} - 1px )'; // leaves 6px between icon + text
|
|
|
|
display: block;
|
|
|
|
width: @toggle-icon-size; // ~22px @ 12
|
|
|
|
height: @toggle-icon-size;
|
|
|
|
font-size: 0.75em; // reduces size of toggle icon to 12px @ 16
|
|
|
|
transform: rotate( -90deg );
|
|
|
|
transition: @transition-duration-base;
|
|
|
|
}
|
2022-02-07 19:20:17 +00:00
|
|
|
|
2022-04-21 16:51:47 +00:00
|
|
|
.sidebar-toc-level-1.sidebar-toc-list-item-expanded .sidebar-toc-toggle {
|
|
|
|
transform: rotate( 0deg );
|
2022-02-07 19:20:17 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-17 22:58:44 +00:00
|
|
|
|
2022-04-26 17:11:33 +00:00
|
|
|
@media ( min-width: @width-breakpoint-desktop ) {
|
2022-03-17 22:58:44 +00:00
|
|
|
.sidebar-toc {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
2022-04-06 22:07:26 +00:00
|
|
|
|
|
|
|
// T300975 following media query for TOC experiment treatment
|
|
|
|
// class can be removed once associated A/B test is over.
|
2022-04-26 17:11:33 +00:00
|
|
|
@media ( max-width: @width-breakpoint-desktop ) {
|
2022-04-06 22:07:26 +00:00
|
|
|
.skin-vector-toc-experiment-treatment #toc {
|
|
|
|
display: table;
|
|
|
|
}
|
|
|
|
}
|