From f29a1eba0ac586ec1e8c1f6559cad21e6f7d60fc Mon Sep 17 00:00:00 2001 From: Volker E Date: Sat, 28 Sep 2019 00:25:09 -0700 Subject: [PATCH] Unify LESS variable naming scheme for `@border-*` variables Unifying variable naming to property-identifier-modifier scheme and use already existing variables out of mediawiki.ui variables file, which gets imported by Vector and its variables (like `@border-width-base`) are already in use in a few places. Change-Id: Ic25b1517bf180a9bce437215c1309bb9f4dd15be --- components/common.less | 4 ++-- components/search.less | 2 +- components/tabs.less | 4 ++-- variables.less | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/common.less b/components/common.less index 2648358..46c6895 100644 --- a/components/common.less +++ b/components/common.less @@ -38,10 +38,10 @@ body { .mw-body { /* Border on top, left, and bottom side */ - border: 1px solid @content-border-color; + border: @border-width-base @border-style-base @border-color-content; border-right-width: 0; /* Merge the border with tabs' one (in their background image) */ - margin-top: -1px; + margin-top: -@border-width-base; // h1's can exist outside of mw-body-content so some heading styles // need to be defined in mw-body as well diff --git a/components/search.less b/components/search.less index cca5e7f..d333f68 100644 --- a/components/search.less +++ b/components/search.less @@ -42,7 +42,7 @@ #searchInput { width: 100%; .box-sizing( border-box ); - border: @border-width-base solid @colorGray10; + border: @border-width-base @border-style-base @colorGray10; border-radius: @borderRadius; // `padding-right` equals to `#searchbutton` width below. padding: 0.4em @width-search-button 0.4em 0.4em; diff --git a/components/tabs.less b/components/tabs.less index 8904b18..1b6086b 100644 --- a/components/tabs.less +++ b/components/tabs.less @@ -144,9 +144,9 @@ min-width: 100%; position: absolute; top: 2.5em; - left: -1px; + left: -@border-width-base; margin: 0; - border: 1px solid #a2a9b1; + border: @border-width-base @border-style-base @border-color-base; border-top-width: 0; padding: 0; box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 ); diff --git a/variables.less b/variables.less index 60201e6..b58d424 100644 --- a/variables.less +++ b/variables.less @@ -29,7 +29,7 @@ @line-height-footer-buttons: 2; // FIXME: Use global variable since Echo and CentralNotice use this variable -@content-border-color: #a7d7f9; +@border-color-content: #a7d7f9; @content-line-height: 1.6; @padding-content: 1em;