From 330dc5f70594d8af8a3af88b5505c0ae8290495b Mon Sep 17 00:00:00 2001 From: Jon Robson Date: Fri, 23 Sep 2022 09:57:02 -0700 Subject: [PATCH] Restore unconditional rendering of siteSub with styling modifications The margin is moved to non-empty elements to avoid extra whitespace when it is empty Bug: T315639 Change-Id: I22aa7dbbacc5bc4ac87cffa13113ced9c9400e0b --- includes/templates/skin.mustache | 4 ++- .../skins.vector.styles/layouts/screen.less | 33 +++++++++---------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/includes/templates/skin.mustache b/includes/templates/skin.mustache index 13538ef8..2a863e81 100644 --- a/includes/templates/skin.mustache +++ b/includes/templates/skin.mustache @@ -58,7 +58,9 @@ {{>ArticleToolbar}}
{{>ContentSubheader}} - {{#html-subtitle}}
{{{.}}}
{{/html-subtitle}} + {{! the #contentSub element is currently used by editors, do not hide or remove it + until https://phabricator.wikimedia.org/T316830 has been addressed}} +
{{{html-subtitle}}}
{{#html-undelete-link}}
{{{.}}}
{{/html-undelete-link}} {{{html-user-message}}} {{{html-body-content}}} diff --git a/resources/skins.vector.styles/layouts/screen.less b/resources/skins.vector.styles/layouts/screen.less index 645c3b8a..1d339398 100644 --- a/resources/skins.vector.styles/layouts/screen.less +++ b/resources/skins.vector.styles/layouts/screen.less @@ -84,28 +84,27 @@ body { float: right; } -#siteSub { - // By default its hidden as it was hidden in Vector legacy but site styles can reveal. - display: none; -} - .vector-body { position: relative; z-index: @z-index-base; +} - #siteSub { - margin-top: 8px; // T311564 - } +#siteSub { + // By default its hidden as it was hidden in Vector legacy but site styles can reveal. + display: none; + margin-top: 8px; // T311564 +} - #contentSub, - #contentSub2 { - font-size: 84%; - line-height: 1.2em; - // T311564 - margin: 8px 0 0; - color: #54595d; - width: auto; - } +// Styles only applied to non-empty #contentSub to avoid extra margins when both #contentSub and #contentSub2 +// are rendered. +#contentSub:not( :empty ), +#contentSub2 { + font-size: 84%; + line-height: 1.2em; + color: @color-base--subtle; + width: auto; + // Visually separate #contentSub and #contentSub2 (T315639) + margin: 8px 0 0; } #left-navigation {