From 826a97db0e6bf3093e42451f7b7080eb91b7a2a2 Mon Sep 17 00:00:00 2001 From: Jon Robson Date: Thu, 17 Mar 2022 15:58:44 -0700 Subject: [PATCH] Table of contents should be hidden at lower resolutions There should be no left margin on article content. Bug: T298898 Change-Id: I92dafcc8f1bbd0dc4a21c20035b829198c18e8cb --- .../skins.vector.styles/components/TableOfContents.less | 7 +++++++ resources/skins.vector.styles/layouts/screen.less | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/resources/skins.vector.styles/components/TableOfContents.less b/resources/skins.vector.styles/components/TableOfContents.less index 5988bbd2b..b00b07643 100644 --- a/resources/skins.vector.styles/components/TableOfContents.less +++ b/resources/skins.vector.styles/components/TableOfContents.less @@ -3,6 +3,7 @@ @subcategory-indent: 8px; .sidebar-toc { + display: none; width: @width-sidebar; max-height: 90vh; padding: 20px 12px 20px 26px; @@ -101,3 +102,9 @@ } } } + +@media ( min-width: @width-breakpoint-tablet ) { + .sidebar-toc { + display: block; + } +} diff --git a/resources/skins.vector.styles/layouts/screen.less b/resources/skins.vector.styles/layouts/screen.less index a95a77881..0186da019 100644 --- a/resources/skins.vector.styles/layouts/screen.less +++ b/resources/skins.vector.styles/layouts/screen.less @@ -321,7 +321,9 @@ body { .vector-toc-visible .mw-workspace-container .mw-article-toolbar-container, .vector-toc-enabled .mw-checkbox-hack-checkbox:checked ~ .mw-workspace-container .mw-content-container, .vector-toc-enabled .mw-checkbox-hack-checkbox:checked ~ .mw-workspace-container .mw-article-toolbar-container { - margin-left: @margin-toc-start-content; + @media ( min-width: @width-breakpoint-tablet ) { + margin-left: @margin-toc-start-content; + } } // Prevent center align when TOC is visible