2022-10-12 16:44:05 +00:00
|
|
|
.citizen-toc {
|
|
|
|
font-size: 0.875rem;
|
2022-10-19 17:30:04 +00:00
|
|
|
line-height: 1.2;
|
2022-10-12 16:44:05 +00:00
|
|
|
|
2022-10-19 17:30:04 +00:00
|
|
|
&__card {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
gap: var( --space-sm );
|
|
|
|
}
|
|
|
|
|
2022-10-19 19:55:28 +00:00
|
|
|
&__top {
|
|
|
|
&:before {
|
|
|
|
width: 0.875rem;
|
|
|
|
height: 0.875rem;
|
2022-10-19 19:56:17 +00:00
|
|
|
content: '';
|
2022-10-19 19:55:28 +00:00
|
|
|
opacity: var( --opacity-icon-base );
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover:before {
|
|
|
|
opacity: var( --opacity-icon-base--hover );
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active:before {
|
|
|
|
opacity: var( --opacity-icon-base--hover );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-19 17:30:04 +00:00
|
|
|
&__header {
|
|
|
|
color: var( --color-base--subtle );
|
|
|
|
letter-spacing: 0.75px;
|
2022-10-12 16:44:05 +00:00
|
|
|
}
|
|
|
|
|
2022-10-19 17:34:37 +00:00
|
|
|
&__contents {
|
|
|
|
margin-left: 1px;
|
|
|
|
}
|
|
|
|
|
2022-10-12 16:44:05 +00:00
|
|
|
&__contents,
|
|
|
|
&__list {
|
|
|
|
border-left: 1px solid var( --border-color-base );
|
2022-10-19 17:30:04 +00:00
|
|
|
margin-top: 0;
|
2022-10-12 16:44:05 +00:00
|
|
|
list-style: none;
|
2022-10-19 17:30:04 +00:00
|
|
|
|
|
|
|
.citizen-toc__link {
|
|
|
|
border-bottom-left-radius: 0;
|
|
|
|
border-top-left-radius: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__list {
|
|
|
|
margin-left: var( --space-sm );
|
2022-10-12 16:44:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__link {
|
|
|
|
display: flex;
|
|
|
|
padding-top: var( --space-sm );
|
|
|
|
padding-bottom: var( --space-sm );
|
2022-10-19 17:30:04 +00:00
|
|
|
border-radius: var( --border-radius--small );
|
2022-10-12 16:44:05 +00:00
|
|
|
color: var( --color-base );
|
|
|
|
font-weight: 500;
|
2022-10-19 19:56:17 +00:00
|
|
|
gap: var( --space-sm );
|
2022-10-19 17:30:04 +00:00
|
|
|
|
2022-10-19 19:24:02 +00:00
|
|
|
&.citizen-toc__top {
|
|
|
|
height: 0;
|
|
|
|
opacity: 0;
|
|
|
|
transition: @transition-opacity, @transition-height;
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
|
2022-10-19 17:30:04 +00:00
|
|
|
&:hover {
|
|
|
|
background-color: var( --background-color-quiet--hover );
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
background-color: var( --background-color-quiet--active );
|
|
|
|
}
|
2022-10-12 16:44:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__indicator {
|
|
|
|
width: 3px;
|
|
|
|
flex-shrink: 0;
|
2022-10-19 17:30:04 +00:00
|
|
|
border-radius: 1000px;
|
2022-10-12 16:44:05 +00:00
|
|
|
margin-left: -2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__numb {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__listItem {
|
|
|
|
&--active {
|
|
|
|
> .citizen-toc__link {
|
|
|
|
color: var( --color-primary );
|
|
|
|
|
|
|
|
.citizen-toc__indicator {
|
|
|
|
background-color: var( --color-primary );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-19 19:24:02 +00:00
|
|
|
// Sticky header styles
|
|
|
|
.citizen-body-header--sticky {
|
|
|
|
.citizen-toc__top.citizen-toc__link {
|
|
|
|
height: 1.05rem; // ( 1rem text + 1rem padding ) * line height / 2
|
|
|
|
opacity: 1;
|
|
|
|
visibility: visible;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-19 19:55:28 +00:00
|
|
|
.skin-citizen-dark {
|
|
|
|
.citizen-toc__top:before {
|
|
|
|
filter: invert( 1 );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-06 20:40:30 +00:00
|
|
|
@media ( min-width: @width-breakpoint-desktop ) {
|
|
|
|
.citizen-toc {
|
|
|
|
grid-area: toc;
|
2022-10-12 16:44:05 +00:00
|
|
|
|
|
|
|
&__card {
|
2022-10-19 17:30:04 +00:00
|
|
|
--toc-margin-top: 0;
|
2022-10-12 16:44:05 +00:00
|
|
|
position: sticky;
|
2022-10-19 17:30:04 +00:00
|
|
|
top: var( --toc-margin-top );
|
|
|
|
max-height: ~'calc( 100vh - var( --toc-margin-top ) )';
|
|
|
|
overflow-y: auto;
|
|
|
|
overscroll-behavior: contain;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Sticky header styles
|
|
|
|
.citizen-body-header--sticky {
|
|
|
|
.citizen-toc__card {
|
|
|
|
--toc-margin-top: ~'calc( var( --header-size ) + var( --space-xl ) )';
|
|
|
|
|
|
|
|
// Sticky header is shorter without buttons
|
|
|
|
@media ( max-height: 800px ) {
|
|
|
|
--toc-margin-top: ~'calc( var( --header-size ) + var( --space-md ) )';
|
|
|
|
}
|
2022-10-12 16:44:05 +00:00
|
|
|
}
|
2022-10-06 20:40:30 +00:00
|
|
|
}
|
2022-10-06 20:31:55 +00:00
|
|
|
}
|