From f92b1171589527ad7d8fd94f78145291cff2d1b1 Mon Sep 17 00:00:00 2001 From: Jan Drewniak Date: Tue, 19 Feb 2019 11:20:25 +0100 Subject: [PATCH] Remove margin from tagline and add .page-heading element Even though on most pages the tagline is empty, it still has a bottom margin associated with it. This patch moves that bottom margin into a container element that wraps both the h1 and tagline. This approach allows us to remove the bottom-margin from the tagline as well as the top-margin from the AMC tabs in favour of just one bottom margin on the .page-heading element. Bug: T214195 Change-Id: I67d3938ab4a75f994acc28a8eefdf19e531c1f3d --- includes/skins/minerva.mustache | 6 ++++-- resources/skins.minerva.amc.styles/tabs.less | 2 +- resources/skins.minerva.base.styles/pageactions.less | 7 ++----- skinStyles/mobile.special.styles/minerva.less | 4 +++- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/includes/skins/minerva.mustache b/includes/skins/minerva.mustache index 75ca845..33d957c 100644 --- a/includes/skins/minerva.mustache +++ b/includes/skins/minerva.mustache @@ -29,8 +29,10 @@ {{#hasheadingholder}} {{{prebodyhtml}}}
- {{{headinghtml}}} - {{{taglinehtml}}} +
+ {{{headinghtml}}} + {{{taglinehtml}}} +
{{#tabs}} {{#items}} {{text}} diff --git a/resources/skins.minerva.amc.styles/tabs.less b/resources/skins.minerva.amc.styles/tabs.less index f22a6ab..f700da8 100644 --- a/resources/skins.minerva.amc.styles/tabs.less +++ b/resources/skins.minerva.amc.styles/tabs.less @@ -1,6 +1,6 @@ .minerva__tab { font-size: @taglineFontSize; - margin: 18px 10px 1px 0; + margin: 0 10px 1px 0; color: @colorGray5; font-weight: bold; padding-bottom: 6px; diff --git a/resources/skins.minerva.base.styles/pageactions.less b/resources/skins.minerva.base.styles/pageactions.less index 5010f7b..61f18a7 100644 --- a/resources/skins.minerva.base.styles/pageactions.less +++ b/resources/skins.minerva.base.styles/pageactions.less @@ -8,14 +8,11 @@ .tagline { color: @colorGray5; font-size: @taglineFontSize; - margin: 2px 0 12px; } } -#section_0 { - padding-top: 0; - padding-bottom: 0; - border-bottom: 0; +.page-heading { + margin-bottom: 12px; } #page-actions { diff --git a/skinStyles/mobile.special.styles/minerva.less b/skinStyles/mobile.special.styles/minerva.less index ae62953..4c3ab90 100644 --- a/skinStyles/mobile.special.styles/minerva.less +++ b/skinStyles/mobile.special.styles/minerva.less @@ -24,8 +24,10 @@ } .heading-holder { - padding-bottom: 15px; padding-top: 26px; + // prevents margin collapsing. i.e. makes .heading-holder height match + // the bottom margin on .page-header, a child element. + overflow: auto; } h1,