From 9954dd0bc418189087c5071574f989533fd84492 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Tue, 13 Oct 2020 14:15:36 -0700 Subject: [PATCH] [vector modern] VisualEditor margins are tied to Vector variables. Bug: T259331 Bug: T259272 Depends-On: Ibbc6f1905ea384a3d159088e3f5eca947eb6ec08 Change-Id: Ic918e9c4ba580ecc54ef51607ce9698e2461c679 --- ...t.mw.DesktopArticleTarget.init-vector.less | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/modules/ve-mw/preinit/styles/ve.init.mw.DesktopArticleTarget.init-vector.less b/modules/ve-mw/preinit/styles/ve.init.mw.DesktopArticleTarget.init-vector.less index 9b78d9ce14..72d6405dc1 100644 --- a/modules/ve-mw/preinit/styles/ve.init.mw.DesktopArticleTarget.init-vector.less +++ b/modules/ve-mw/preinit/styles/ve.init.mw.DesktopArticleTarget.init-vector.less @@ -5,15 +5,29 @@ * @license The MIT License (MIT); see LICENSE.txt */ +// Local copy of Vector variables. +// Can be removed after I87c5502530cd0039b090fbd3cfa7615d6cd64b36 is merged. +@padding-top-content: 1.25em; +@padding-horizontal-content: 0.5em; +// End local copy of Vector variables. + +@padding-top-toolbar: -@padding-top-content/0.875; +@padding-horizontal-toolbar: -@padding-horizontal-content/0.875; + .ve-init-mw-desktopArticleTarget-toolbar, .ve-init-mw-desktopArticleTarget-toolbarPlaceholder { font-size: 0.875em; - /* 1/0.875 */ - margin: -1.14em -1.14em 1.14em -1.14em; - /* High-definition-specific styles (because Vector adds 1em to the leftNav if width is 982px+ */ - @media screen and ( min-width: 982px ) { - .skin-vector-legacy & { + // New Vector + margin: @padding-top-toolbar @padding-horizontal-toolbar -@padding-top-toolbar @padding-horizontal-toolbar; + + // Legacy Vector + .skin-vector-legacy & { + /* 1/0.875 */ + margin: -1.14em -1.14em 1.14em -1.14em; + + /* High-definition-specific styles (because Vector adds 1em to the leftNav if width is 982px+ */ + @media screen and ( min-width: 982px ) { /* 1.25/0.875, 1.5/0.875 */ margin: -1.43em -1.71em 1.43em -1.71em; }