Merge "registration: Only allow one extension to set a specific config setting"
[lhc/web/wiklou.git] / resources / src / mediawiki.less / mediawiki.ui / mixins.less
1 // ----------------------------------------------------------------------------
2 // Form styling mixins
3 // ----------------------------------------------------------------------------
4 .agora-label-styling() {
5 font-size: 0.9em;
6 color: @colorText;
7
8 * {
9 font-weight: normal;
10 }
11 }
12
13 .agora-inline-label-styling() {
14 margin-bottom: 0.5em;
15 cursor: pointer;
16 vertical-align: bottom;
17 line-height: normal;
18 font-weight: normal;
19
20 & > input[type='checkbox'],
21 & > input[type='radio'] {
22 width: auto;
23 height: auto;
24 margin: 0 0.1em 0 0;
25 padding: 0;
26 border: 1px solid @colorGray7;
27 cursor: pointer;
28 }
29 }
30
31 // ----------------------------------------------------------------------------
32 // Button styling
33 // ----------------------------------------------------------------------------
34
35 .button-colors( @bgColor, @highlightColor, @activeColor ) {
36 background-color: @bgColor;
37 color: @colorButtonText;
38 border: 1px solid @colorFieldBorder;
39
40 // Make sure that `color` isn't inheriting from user-agent styles
41 &:visited {
42 color: @colorButtonText;
43 }
44
45 &:hover {
46 background-color: @highlightColor;
47 color: @colorGray4;
48 border-color: @colorGray10;
49 }
50
51 &:focus {
52 background-color: @highlightColor;
53 // Make sure that `color` isn't inheriting from user-agent styles
54 color: @colorButtonText;
55 border-color: @colorProgressive;
56 box-shadow: inset 0 0 0 1px @colorProgressive, inset 0 0 0 2px #fff;
57 }
58
59 &:active,
60 &.is-on,
61 &.mw-ui-checked {
62 background-color: @activeColor;
63 color: @colorGray1;
64 border-color: @colorGray7;
65 box-shadow: none;
66 }
67
68 &:disabled {
69 background-color: @colorGray12;
70 color: #fff;
71 border-color: @colorGray12;
72
73 // Make sure disabled buttons don't have hover and active states
74 &:hover,
75 &:active {
76 background-color: @colorGray12;
77 color: #fff;
78 box-shadow: none;
79 border-color: @colorGray12;
80 }
81 }
82 }
83
84 .button-colors-primary( @bgColor, @highlightColor, @activeColor ) {
85 background-color: @bgColor;
86 color: #fff;
87 // border of the same color as background so that light background and
88 // dark background buttons are the same height and width
89 border: 1px solid @bgColor;
90
91 &:hover {
92 background-color: @highlightColor;
93 border-color: @highlightColor;
94 }
95
96 &:focus {
97 box-shadow: inset 0 0 0 1px @bgColor, inset 0 0 0 2px #fff;
98 }
99
100 &:active,
101 &.is-on,
102 &.mw-ui-checked {
103 background-color: @activeColor;
104 border-color: @activeColor;
105 box-shadow: none;
106 }
107
108 &:disabled {
109 background-color: @colorGray12;
110 color: #fff;
111 border-color: @colorGray12;
112
113 // Make sure disabled buttons don't have hover and active states
114 &:hover,
115 &:active,
116 &.mw-ui-checked {
117 background-color: @colorGray12;
118 color: #fff;
119 border-color: @colorGray12;
120 box-shadow: none;
121 }
122 }
123 }
124
125 .button-colors-quiet( @textColor, @highlightColor, @activeColor ) {
126 // Quiet buttons all start gray, and reveal
127 // progressive/destructive color on hover and active.
128 color: @colorButtonText;
129
130 &:hover {
131 background-color: transparent;
132 color: @highlightColor;
133 }
134
135 &:active,
136 &.mw-ui-checked {
137 color: @activeColor;
138 }
139
140 &:focus {
141 background-color: transparent;
142 color: @textColor;
143 }
144
145 &:disabled {
146 color: @colorDisabledText;
147 }
148 }