Merge "Plural rules: updates for UTS #35 Rev 33"
[lhc/web/wiklou.git] / resources / mediawiki.ui / components / default / buttons.less
1 @import "../../settings/typography";
2 @import "../../mixins/effects";
3
4 // Buttons
5 //
6 // Styleguide 2.
7
8 @buttonBorderRadius: 3px;
9
10 // Button styling
11 //
12 // Basic button styling to be used on desktop skins. Can be any element.
13 // Due to a lack of a CSS reset, the exact styling of the button depends on what type of element is used.
14 //
15 // Markup:
16 // <div class="mw-ui-button">button.mw-ui-button</div>
17 //
18 // Styleguide 2.1.
19 .mw-ui-button {
20 // Container layout
21 display: inline-block;
22 padding: 0.4em 1em 0.4em 1em;
23 margin: 0;
24
25 // IE6/IE7 hack
26 // http://stackoverflow.com/a/5838575/365238
27 *display: inline;
28 zoom: 1;
29
30 // Container styling
31 .buttonColors();
32 border-radius: @buttonBorderRadius;
33
34 // Ensure that buttons and inputs are nicely aligned when they have differing heights
35 vertical-align: middle;
36
37 // Content styling
38 text-align: center;
39 text-decoration: none;
40
41 font-weight: bold;
42
43 // Interaction styling
44 cursor: pointer;
45
46 &:disabled,
47 &.mw-ui-disabled {
48 cursor: default;
49 }
50
51 // Button sizes and displays
52 // -----------------------------------------
53 &.mw-ui-big {
54 font-size: @baseFontSize * 1.3;
55 }
56 &.mw-ui-block {
57 display: block;
58 width: 100%;
59 }
60 }
61
62 // This overrides an underline declaration on a:hover and a:focus in commonElements.css, which the
63 // class alone isn't specific enough to do
64 a.mw-ui-button {
65 text-decoration: none;
66 }
67
68 // Button groups
69 //
70 // Group of buttons. Make sure you clear the floating after using a mw-ui-button-group.
71 //
72 // Markup:
73 // <div class="mw-ui-button-group">
74 // <div class="mw-ui-button">A</div>
75 // <div class="mw-ui-button">B</div>
76 // <div class="mw-ui-button">C</div>
77 // <div class="mw-ui-button">D</div>
78 // </div><div style="clear:both"></div>
79 //
80 // Styleguide 2.2.
81 .mw-ui-button-group > * {
82 border-radius: 0;
83 float: left;
84
85 &:first-child{
86 border-top-left-radius: @buttonBorderRadius;
87 border-bottom-left-radius: @buttonBorderRadius;
88 }
89
90 &:last-child{
91 border-top-right-radius: @buttonBorderRadius;
92 border-bottom-right-radius: @buttonBorderRadius;
93 }
94 }