From 17494706ef4bee829fac9971624c0e70f115d3a8 Mon Sep 17 00:00:00 2001 From: Matthew Flaschen Date: Mon, 23 Dec 2013 17:14:50 -0500 Subject: [PATCH] Apply mediawiki.ui.button colors to all skins Specific skins can still add overrides using skinStyles. However, before this change, there was no custom style for any other skin. They just looked like Vector without the colors and type. That grey could be confused with a 'disabled' state. Vector still has an override just for the font size and height. Bug: 55554 Change-Id: I5ed8f6ca7d756731639fa4b62fbb4e4d74972100 --- .../components/default/buttons.less | 44 ++++++++++++++++++- .../components/vector/buttons.less | 42 ------------------ 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/resources/mediawiki.ui/components/default/buttons.less b/resources/mediawiki.ui/components/default/buttons.less index 3dc13c5f64..8276b1c8b6 100644 --- a/resources/mediawiki.ui/components/default/buttons.less +++ b/resources/mediawiki.ui/components/default/buttons.less @@ -48,15 +48,57 @@ cursor: default; } - // Button sizes and displays + // Styling for specific button types // ----------------------------------------- &.mw-ui-big { font-size: @baseFontSize * 1.3; } + &.mw-ui-block { display: block; width: 100%; } + + // Primary buttons + // + // Do not use the mw-ui-primary class use mw-ui-constructive instead. For blue buttons + // use mw-ui-progressive (coming soon) + // + // Markup: + // + // + // Styleguide 2.1.1. + &.mw-ui-primary { + .buttonColors(@agoraBlue); + } + + // Constructive buttons + // + // Use constructive buttons for actions which result in a final action in the process that results + // in a change of state. + // e.g. save changes button + // + // Markup: + // + // + // Styleguide 2.1.2. + &.mw-ui-constructive { + .buttonColors(@agoraGreen); + } + + // Destructive buttons + // + // Use destructive buttons for actions which result in the destruction of data. + // e.g. deleting a page. + // This should not be used for cancel buttons. + // + // Markup: + // + // + // Styleguide 2.1.3. + &.mw-ui-destructive { + .buttonColors(@agoraRed); + } } // This overrides an underline declaration on a:hover and a:focus in commonElements.css, which the diff --git a/resources/mediawiki.ui/components/vector/buttons.less b/resources/mediawiki.ui/components/vector/buttons.less index 2c215f66be..15363384d5 100644 --- a/resources/mediawiki.ui/components/vector/buttons.less +++ b/resources/mediawiki.ui/components/vector/buttons.less @@ -2,47 +2,5 @@ @import "../../mixins/type"; .mw-ui-button { - // Primary buttons - // - // Do not use the mw-ui-primary class use mw-ui-constructive instead. For blue buttons - // use mw-ui-progressive (coming soon) - // - // Markup: - // - // - // Styleguide 2.1.1. - &.mw-ui-primary { - .buttonColors(@agoraBlue); - } - - // Constructive buttons - // - // Use constructive buttons for actions which result in a final action in the process that results - // in a change of state. - // e.g. save changes button - // - // Markup: - // - // - // Styleguide 2.1.2. - &.mw-ui-constructive { - .buttonColors(@agoraGreen); - } - - - // Destructive buttons - // - // Use destructive buttons for actions which result in the destruction of data. - // e.g. deleting a page. - // This should not be used for cancel buttons. - // - // Markup: - // - // - // Styleguide 2.1.3. - &.mw-ui-destructive { - .buttonColors(@agoraRed); - } - .vector-type(); } -- 2.20.1