TOC: Ensure TOC spacing is correct when grid is enabled

Fix usage of CSS calc

Change-Id: I6dcf3751a4b478a14d8052a70720e138238203d3
This commit is contained in:
bwang 2022-06-24 14:23:49 -05:00 committed by Jdlrobson
parent 0a00ad5b40
commit 61e723c541
2 changed files with 3 additions and 3 deletions

View File

@ -102,7 +102,7 @@
@button-padding: 12px;
@arrow-width: 18px;
position: relative;
padding-right: calc( @button-padding + @arrow-width );
padding-right: ~'calc( @{button-padding} + @{arrow-width} )';
white-space: nowrap;
&:after {

View File

@ -196,13 +196,13 @@ body {
.mw-table-of-contents-container {
// stylelint-disable-next-line plugin/no-unsupported-browser-features
position: sticky;
float: left;
// Defaults to -2em to account for the TOC's top margin
// ensuring the TOC is 1.5em (24px) from the top of the viewport
// unless .mw-sticky-header-element overrides it.
top: calc( 1.5em - @top-margin-sidebar-toc_title_inline );
top: ~'calc( 1.5em - @{top-margin-sidebar-toc_title_inline} )';
.vector-layout-legacy & {
float: left;
clear: both;
}
}