Skip to content

Commit

Permalink
fix(toc): 🐛 incorrect breakpoints for ToC
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair3149 committed Nov 16, 2023
1 parent 684f20a commit 21f7cc4
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions resources/skins.citizen.styles/components/TableOfContents.less
Original file line number Diff line number Diff line change
Expand Up @@ -124,27 +124,17 @@
}
}

// Move down when site header is hidden
@media ( max-width: ( @width-breakpoint-tablet ) ) {
.citizen-toc {
transition: var( --transition-menu );
transition-property: transform;
will-change: transform;
}

.citizen-scroll--down .citizen-toc {
transform: translateY( var( --header-size ) );
}
}

@media ( max-width: ( @width-breakpoint-desktop - 1px ) ) {
@media ( max-width: ( @max-width-breakpoint-tablet ) ) {
.citizen-toc {
position: fixed;
right: 0;
bottom: ~'calc( var( --header-size ) + var( --space-xs ) )';
z-index: @z-index-page-header;
// Allow click through
pointer-events: none;
transition: var( --transition-menu );
transition-property: transform;
will-change: transform;

&__card {
// This is not bulletproof since it will get covered by page header
Expand All @@ -160,6 +150,11 @@
.citizen-card-hide( bottom right, '', false );
.citizen-card-transition();
}

// Move down when site header is hidden
.citizen-scroll--down & {
transform: translateY( var( --header-size ) );
}
}

#citizen-toc {
Expand Down

0 comments on commit 21f7cc4

Please sign in to comment.