Express sidebar width in pixel for font size

Bug: T313817
Change-Id: Ic8917bf14eb688f84ca8dfbaea055f93fe829469
This commit is contained in:
Jon Robson 2022-08-04 07:26:18 +01:00 committed by Jdlrobson
parent f366c2ad9c
commit 8a46797eec
2 changed files with 4 additions and 4 deletions

View file

@ -133,8 +133,6 @@
@width-sidebar-px-wide: 244;
@margin-toc-start-content: unit( ( @width-sidebar-px + 24 ) / @font-size-browser, em );
@margin-toc-start-content-wide: unit( ( @width-sidebar-px-wide + 52 ) / @font-size-browser, em ); // 18.5em;
@width-sidebar: unit( @width-sidebar-px / @font-size-browser, em );
@width-sidebar-wide: unit( @width-sidebar-px-wide / @font-size-browser, em );
// Search
@max-width-search: unit( 500px / @font-size-browser / @font-size-base, em ); // 35.71428571em @ 16 & 0.875em T270202

View file

@ -30,11 +30,13 @@
.sidebar-toc,
.sidebar-toc:after {
// Match styles between TOC and fade element to ensure the fade covers the correct area
width: @width-sidebar;
// This is expressed in pixels to support different font sizes since our layout is currently
// expressed in pixels. See T313817.
width: @width-sidebar-px;
margin-left: 0;
@media ( min-width: @min-width-desktop-wide ) {
width: @width-sidebar-wide;
width: @width-sidebar-px-wide;
margin-left: @margin-start-sidebar-content;
}
}