Import: Handle uploads with sha1 starting with 0 properly
[mediawiki.git] / resources / src / mediawiki.less / mediawiki.ui / mixins.less
blob1b31956d8e55f66229caee7a2f34d4faec60362d
1 // ----------------------------------------------------------------------------
2 // Form styling mixins
3 // ----------------------------------------------------------------------------
4 .agora-label-styling() {
5         font-size: 0.9em;
6         color: @colorText;
8         * {
9                 font-weight: normal;
10         }
13 .agora-inline-label-styling() {
14         margin-bottom: 0.5em;
15         cursor: pointer;
16         vertical-align: bottom;
17         line-height: normal;
19         font-weight: normal;
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         }
32 // ----------------------------------------------------------------------------
33 // Button styling
34 // ----------------------------------------------------------------------------
36 .button-colors(@bgColor, @highlightColor, @activeColor) {
37         background: @bgColor;
39         &:hover {
40                 // The inner bottom bevel should match the active background color.
41                 background-color: @highlightColor;
42         }
44         &:focus {
45                 border-color: @colorWhite;
46                 box-shadow: 0 0 0 1px @highlightColor;
48                 outline: none;
49                 // remove outline in Firefox
50                 &::-moz-focus-inner {
51                         border-color: transparent;
52                 }
53         }
55         &:active,
56         &.mw-ui-checked {
57                 background: @activeColor;
58                 box-shadow: none;
59         }
62 .button-colors(@bgColor, @highlightColor, @activeColor) when (lightness(@bgColor) >= 70%) {
63         color: @colorButtonText;
64         border: 1px solid @colorGray12;
66         &:hover,
67         &:active,
68         &:visited {
69                 // make sure that is isn't inheriting from a general rule
70                 color: @colorButtonText;
71         }
73         &:focus {
74                 background-color: @highlightColor;
75         }
77         &:disabled {
78                 color: @colorDisabledText;
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         }
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);
96         &:disabled {
97                 background: @colorGray13;
98                 border-color: @colorGray13;
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         }
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;
114         &:hover,
115         &:focus {
116                 background: transparent;
117                 color: @textColor;
118         }
120         &:active,
121         &.mw-ui-checked {
122                 color: @activeColor;
123         }
125         &:disabled {
126                 color: @colorDisabledText;
127         }