From 4a7bd78d8b5aa873c264b834ea77fe0f64f3199d Mon Sep 17 00:00:00 2001 From: Volker E Date: Mon, 4 Mar 2019 19:34:55 -0800 Subject: [PATCH] Move `html` and `body` styles to 'ui.less' Moving reset properties - `font-family` and - `font-size` and opinionated - `margin` to ui.less. All other properties from 'reset.less' don't apply to those elements. Also - consolidating body `background-color` and `color` in 'ui.less' and - moving `html` affecting property there as well. Bug: T205341 Bug: T217621 Change-Id: I4c545da76e6fdebced41e6e7e6eb89e4d97a8b24 --- resources/skins.minerva.base.styles/reset.less | 6 +----- resources/skins.minerva.base.styles/ui.less | 14 +++++++++++++- resources/skins.minerva.content.styles/main.less | 7 ------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/resources/skins.minerva.base.styles/reset.less b/resources/skins.minerva.base.styles/reset.less index 4cb3c31..a7bd8bf 100644 --- a/resources/skins.minerva.base.styles/reset.less +++ b/resources/skins.minerva.base.styles/reset.less @@ -4,7 +4,7 @@ */ @import '../../minerva.less/minerva.mixins'; -html, body, div, span, +div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, ins, em, img, @@ -37,10 +37,6 @@ button { cursor: pointer; } -body { - line-height: 1; -} - input { line-height: normal; } diff --git a/resources/skins.minerva.base.styles/ui.less b/resources/skins.minerva.base.styles/ui.less index beef00f..d2a0e19 100644 --- a/resources/skins.minerva.base.styles/ui.less +++ b/resources/skins.minerva.base.styles/ui.less @@ -9,8 +9,20 @@ body { height: 100%; } +html { + // FIXME: Still from Eric Meyer's reset, that should be better fine-grained. + font-size: 100%; + // Support Safari: Prevent font scaling in landscape + -webkit-text-size-adjust: none; +} + body { - background-color: @chromeColor; + background-color: @skinContentBgColor; + color: @colorGray2; + // Support All Browsers: Remove `margin` (normalized) + margin: 0; + // FIXME: Still from Eric Meyer's reset, that should be good to go. + line-height: 1; } // FIXME: should we use .mw-body here instead? diff --git a/resources/skins.minerva.content.styles/main.less b/resources/skins.minerva.content.styles/main.less index ee20592..6bd37a0 100644 --- a/resources/skins.minerva.content.styles/main.less +++ b/resources/skins.minerva.content.styles/main.less @@ -7,19 +7,12 @@ // // Styleguide 1. -html { - // prevent font scaling in landscape in Safari - -webkit-text-size-adjust: none; -} - @font-size-body: 100% * @fontScalingFactor; body { font-family: @fontFamily; font-size: @font-size-body; line-height: 1.4; - color: @colorGray2; - background: #fff; -webkit-tap-highlight-color: rgba( 0, 0, 0, 0.2 ); }