1 // Mediawiki.ui button mixins for MediaWiki (deprecated)
3 // Helper mixins used to create button styles. This file is importable
4 // by all LESS files via `@import 'mediawiki.ui/mixins.buttons';`.
6 /* stylelint-disable selector-class-pattern */
8 // Default button mixin.
11 display: inline-block;
12 .box-sizing( border-box );
14 max-width: 28.75em; // equivalent to 460px, @see T95367
16 padding: 0.57142857em 0.9375em; // equivalent to `8px 12px`
17 border: @border-width-base @border-style-base @border-color-base;
18 border-radius: @borderRadius;
20 // Ensure that buttons and inputs are nicely aligned when they have differing heights
21 vertical-align: middle;
22 // Inherit the font rather than apply user agent stylesheet (T72072)
28 // Disable weird iOS styling
29 -webkit-appearance: none;
31 // https://stackoverflow.com/a/5838575/365238
32 *display: inline; /* stylelint-disable-line declaration-block-no-duplicate-properties */
36 // Mixin for button interaction states.
37 .mw-ui-button-states() {
38 // Make sure that `color` isn't inheriting from user-agent styles
40 color: @colorButtonText;
44 background-color: @background-color-base;
46 border-color: @colorGray10;
50 background-color: @background-color-base;
51 // Make sure that `color` isn't inheriting from user-agent styles
52 color: @colorButtonText;
53 border-color: @colorProgressive;
54 box-shadow: inset 0 0 0 1px @colorProgressive, inset 0 0 0 2px @background-color-base;
57 // Remove the inner border and padding in Firefox.
59 border-color: transparent;
66 background-color: @colorGray12;
68 border-color: @colorGray7;
73 background-color: @colorGray12;
74 color: @colorBaseInverted;
75 border-color: @colorGray12;
78 // Make sure disabled buttons don't have hover and active states
81 background-color: @colorGray12;
82 color: @colorBaseInverted;
84 border-color: @colorGray12;
88 // `:not()` is used exclusively for `transition`s as both are not supported by IE < 9
90 .transition( ~'background-color 100ms, color 100ms, border-color 100ms, box-shadow 100ms' );
94 // Primary buttons mixin.
95 .mw-ui-button-colors-primary( @bgColor, @highlightColor, @activeColor ) {
96 background-color: @bgColor;
98 // border of the same color as background so that light background and
99 // dark background buttons are the same height and width
100 border: 1px solid @bgColor;
103 background-color: @highlightColor;
104 border-color: @highlightColor;
108 box-shadow: inset 0 0 0 1px @bgColor, inset 0 0 0 2px #fff;
113 background-color: @activeColor;
114 border-color: @activeColor;
119 background-color: @colorGray12;
121 border-color: @colorGray12;
123 // Make sure disabled buttons don't have hover and active states
126 background-color: @colorGray12;
128 border-color: @colorGray12;