From feca6b276bca4beecf70e0e2d301c5810855923c Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 31 May 2018 03:14:30 +0100 Subject: [PATCH] Remove unused margin/padding override for '#mw-head h3' Matches the following 6 elements: 1. h3#p-personal-label Hidden per `#p-personal h3`. 2. h3#p-namespaces-label 3. h3#p-views-label Hidden per `div.vectorTabs h3`. 4. #p-search h3 Already has its own margin and padding that override this override. 5. h3#p-variants-label 6. h3#p-cactions-label Margin overriden by `div#mw-head div.vectorMenu h3`. Moved padding there as well. This last one is the one the styles were originally intended for, because the tabs that the menus align with also don't have padding. The other instances of an 'h3' within mw-head, however, were not vector menus and even if they didn't have their own padding already or weren't display-none, then it's unlikely they would want to align with the unrelated vectorMenu styles, e.g. the p-personal area is quite different and just happens to be in the same parent element as an h3. Change-Id: Id127ead7a50fcd64821442afd0e781f97756502f --- components/navigation.less | 5 ----- components/tabs.less | 10 ++++++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/components/navigation.less b/components/navigation.less index 2b047c2..1d22539 100644 --- a/components/navigation.less +++ b/components/navigation.less @@ -35,11 +35,6 @@ top: 0; right: 0; width: 100%; - - h3 { - margin: 0; - padding: 0; - } } /* Navigation Containers */ diff --git a/components/tabs.less b/components/tabs.less index 2b5c64d..b000613 100644 --- a/components/tabs.less +++ b/components/tabs.less @@ -107,10 +107,12 @@ background-position: bottom right; font-size: 1em; height: 2.5em; - // `padding-right` >= `1px` effectively moves the "background border" outside of the element to act like a real - // border. It is necessary for `.vectorMenu .menu` dropdown to align well. - padding-right: 0.5em; // equals `8px` at computed `font-size` of `14px` as visually harmonically with `padding-left` in `.vectorMenu h3 span` - margin-right: -1px; + // `padding-right` >= `1px` effectively moves the "background border" outside of the element to + // act like a real border. It is necessary for `.vectorMenu .menu` dropdown to align well. + // 0.5em equals `8px` at computed `font-size` of `14px` as visually harmonically with + // `padding-left` in `.vectorMenu h3 span` + padding: 0 0.5em 0 0; + margin: 0 -1px 0 0; } .vectorMenu h3 {