From 190d9830ca2f5c03b9e969bf9bae112ed1448266 Mon Sep 17 00:00:00 2001 From: Volker E Date: Mon, 30 Sep 2019 00:36:32 -0700 Subject: [PATCH] Reduce specificity by using classes without element selector addition That's not only good practice, it also allows to widely simplify 'watchstar.less' selectors. Change-Id: Ic31452f985e99d60f6fc71473be7de08bdc16148 --- components/tabs.less | 58 ++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/components/tabs.less b/components/tabs.less index 444425a5b..d7f002206 100644 --- a/components/tabs.less +++ b/components/tabs.less @@ -41,30 +41,6 @@ line-height: @line-height-nav; white-space: nowrap; - &.new { - a, - a:visited { - color: @color-link-new; - } - } - - &.selected { - .background-image('images/tab-current-fade.png'); - - a, - a:visited { - color: @color-link-selected; - text-decoration: none; - } - } - - &.icon { - a { - background-position: bottom right; - background-repeat: no-repeat; - } - } - a { color: @color-link; display: block; @@ -76,6 +52,30 @@ } } + .new { + a, + a:visited { + color: @color-link-new; + } + } + + .selected { + .background-image('images/tab-current-fade.png'); + + a, + a:visited { + color: @color-link-selected; + text-decoration: none; + } + } + + .icon { + a { + background-position: bottom right; + background-repeat: no-repeat; + } + } + span { display: inline-block; .background-image('images/tab-break.png'); @@ -184,12 +184,12 @@ cursor: pointer; font-size: @font-size-tabs; } + } - &.selected a, - &.selected a:visited { - color: @color-link-selected; - text-decoration: none; - } + .selected a, + .selected a:visited { + color: @color-link-selected; + text-decoration: none; } }