From 62560debb94594340d85263d55527ad851fd203c Mon Sep 17 00:00:00 2001 From: Volker E Date: Fri, 27 Sep 2019 23:24:34 -0700 Subject: [PATCH] Unify LESS variable naming scheme for `@margin-*`/`@padding-*` variables Unifying variable naming to property-identifier-modifier scheme. Also removing `@padding` variable with only one single usage, instead of extracting it from its place of application enable simpler readability. Change-Id: I602fe645b233000bcecaeee6cf19d20e49a64c78 --- components/common.less | 2 +- components/navigation.less | 8 ++++---- variables.less | 5 ++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/components/common.less b/components/common.less index c636049..2648358 100644 --- a/components/common.less +++ b/components/common.less @@ -27,7 +27,7 @@ body { .parsoid-body { background-color: @background-color-base; color: @color-base; - padding: @content-padding; + padding: @padding-content; direction: ltr; } diff --git a/components/navigation.less b/components/navigation.less index f45e747..8723eb3 100644 --- a/components/navigation.less +++ b/components/navigation.less @@ -84,7 +84,7 @@ h3 { color: @menu-main-heading-color; font-weight: normal; - margin: 0.5em 0 0 ( @menu-main-body-margin-left / @font-size-menu-main-heading ); + margin: 0.5em 0 0 ( @margin-left-menu-main-body / @font-size-menu-main-heading ); padding: 0.25em 0; cursor: default; border: 0; @@ -92,7 +92,7 @@ } .body { - margin-left: @menu-main-body-margin-left; + margin-left: @margin-left-menu-main-body; padding-top: 0; background-image: url( images/portal-break.png ); background-repeat: no-repeat; @@ -100,7 +100,7 @@ ul { list-style: none none; margin: 0; - padding: @menu-main-body-padding; + padding-top: 0.3em; } li { @@ -132,7 +132,7 @@ .body { background-image: none; - margin-left: @menu-main-body-margin-left; + margin-left: @margin-left-menu-main-body; } } } diff --git a/variables.less b/variables.less index fefd347..60201e6 100644 --- a/variables.less +++ b/variables.less @@ -31,7 +31,7 @@ // FIXME: Use global variable since Echo and CentralNotice use this variable @content-border-color: #a7d7f9; @content-line-height: 1.6; -@content-padding: 1em; +@padding-content: 1em; // Navigation @background-color-secondary: #f6f6f6; @@ -45,8 +45,7 @@ @menu-main-heading-color: #444; @font-size-menu-main-body: unit( 12 / @font-size-browser, em ); -@menu-main-body-margin-left: 0.5em; -@menu-main-body-padding: 0.3em 0 0 0; +@margin-left-menu-main-body: 0.5em; // Personal menu @background-position-menu-personal-icon: left ( 4 / @font-size-browser / @font-size-menu-personal );