From 9a2d85f28a30a5d3280decf32d46d61c60418346 Mon Sep 17 00:00:00 2001 From: kaldari Date: Mon, 6 Oct 2014 17:30:15 -0700 Subject: [PATCH] Updating style documentation for quiet anchors and quiet buttons See discussion on design-l for more context: https://lists.wikimedia.org/pipermail/design/2014-October/002161.html Change-Id: I1d958724d4222c95ad5ed52778d26228b09bd121 --- .../src/mediawiki.ui/components/anchors.less | 45 ++++++++++++------- .../src/mediawiki.ui/components/buttons.less | 1 + 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/resources/src/mediawiki.ui/components/anchors.less b/resources/src/mediawiki.ui/components/anchors.less index 1a58170308..f0fb7b95b3 100644 --- a/resources/src/mediawiki.ui/components/anchors.less +++ b/resources/src/mediawiki.ui/components/anchors.less @@ -22,18 +22,6 @@ } } -.mixin-mw-ui-anchor-styles-quiet( @mainColor ) { - color: @colorTextLight; - text-decoration: none; - - &:hover { - color: @mainColor; - } - &:focus, &:active { - color: darken( @mainColor, @colorDarkenPercentage ); - } -} - /* Anchors @@ -42,16 +30,16 @@ having to assign it as a button type. mw-ui-anchor only changes the text color, with other base classes, such as mw-ui-button. Markup: -Progressive -Constructive -Destructive +Progressive +Constructive +Destructive .mw-ui-quiet - Quiet until interaction. Styleguide 6.2. */ -// Setup compound anchor selectors (such as .mw-ui-anchor.my-ui-progressive) +// Setup compound anchor selectors (such as .mw-ui-anchor.mw-ui-progressive) .mw-ui-anchor { &.mw-ui-progressive { .mixin-mw-ui-anchor-styles( @colorProgressive ); @@ -65,3 +53,28 @@ Styleguide 6.2. .mixin-mw-ui-anchor-styles( @colorDestructive ); } } + +/* +Quiet anchors + +Use quiet anchors when they are less important and alongside other progressive/destructive/progressive +anchors. Use of quiet anchors is not recommended on mobile/tablet due to lack of hover state. + +Markup: +Progressive +Constructive +Destructive + +Styleguide 6.2.1. +*/ +.mixin-mw-ui-anchor-styles-quiet( @mainColor ) { + color: @colorTextLight; + text-decoration: none; + + &:hover { + color: @mainColor; + } + &:focus, &:active { + color: darken( @mainColor, @colorDarkenPercentage ); + } +} diff --git a/resources/src/mediawiki.ui/components/buttons.less b/resources/src/mediawiki.ui/components/buttons.less index 01c481d108..64909960d6 100644 --- a/resources/src/mediawiki.ui/components/buttons.less +++ b/resources/src/mediawiki.ui/components/buttons.less @@ -189,6 +189,7 @@ // Quiet buttons // // Use quiet buttons when they are less important and alongisde other progressive/destructive/progressive buttons. + // Use of quiet buttons is not recommended on mobile/tablet due to lack of hover state. // // Markup: //
-- 2.20.1