Merge "Don't send email notifs to blocked users if $wgBlockDisablesLogin is true"
[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
19 font-weight: normal;
20
21 & > input[type="checkbox"],
22 & > input[type="radio"] {
23 width: auto;
24 height: auto;
25 margin: 0 0.1em 0 0;
26 padding: 0;
27 border: 1px solid @colorFieldBorder;
28 cursor: pointer;
29 }
30 }
31
32 // ----------------------------------------------------------------------------
33 // Button styling
34 // ----------------------------------------------------------------------------
35
36 .button-colors(@bgColor, @highlightColor, @activeColor) {
37 background: @bgColor;
38
39 &:hover {
40 // The inner bottom bevel should match the active background color.
41 background-color: @highlightColor;
42 }
43
44 &:focus {
45 border-color: @colorWhite;
46 box-shadow: 0 0 0 1px @highlightColor;
47
48 outline: none;
49 // remove outline in Firefox
50 &::-moz-focus-inner {
51 border-color: transparent;
52 }
53 }
54
55 &:active,
56 &.mw-ui-checked {
57 background: @activeColor;
58 box-shadow: none;
59 }
60 }
61
62 .button-colors(@bgColor, @highlightColor, @activeColor) when (lightness(@bgColor) >= 70%) {
63 color: @colorButtonText;
64 border: 1px solid @colorGray12;
65
66 &:hover,
67 &:active,
68 &:visited {
69 // make sure that is isn't inheriting from a general rule
70 color: @colorButtonText;
71 }
72
73 &:focus {
74 background-color: @highlightColor;
75 }
76
77 &:disabled {
78 color: @colorDisabledText;
79
80 // make sure disabled buttons don't have hover and active states
81 &:hover,
82 &:active {
83 background: @bgColor;
84 box-shadow: none;
85 }
86 }
87 }
88
89 .button-colors(@bgColor, @highlightColor, @activeColor) when (lightness(@bgColor) < 70%) {
90 color: #fff;
91 // border of the same color as background so that light background and
92 // dark background buttons are the same height and width
93 border: 1px solid @bgColor;
94 text-shadow: 0 1px rgba(0, 0, 0, .1);
95
96 &:disabled {
97 background: @colorGray13;
98 border-color: @colorGray13;
99
100 // make sure disabled buttons don't have hover and active states
101 &:hover,
102 &:active,
103 &.mw-ui-checked {
104 box-shadow: none;
105 }
106 }
107 }
108
109 .button-colors-quiet(@textColor, @highlightColor, @activeColor) {
110 // Quiet buttons all start gray, and reveal
111 // constructive/progressive/destructive color on hover and active.
112 color: @colorButtonText;
113
114 &:hover,
115 &:focus {
116 background: transparent;
117 color: @textColor;
118 }
119
120 &:active,
121 &.mw-ui-checked {
122 color: @activeColor;
123 }
124
125 &:disabled {
126 color: @colorDisabledText;
127 }
128 }