Small style optimization
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / style / button.less
CommitLineData
09100ebd 1/* default values */
184a8d6d
AE
2button,
3input[type='reset'],
4input[type='submit'],
5input[type='button'],
6.button {
184a8d6d
AE
7 border-style: solid;
8 border-width: 1px;
b828c5cb 9 cursor: pointer;
184a8d6d 10 display: inline-block;
15d36a35 11 margin: 0 2px;
184a8d6d 12 padding: 5px 13px;
0db0396f 13 position: relative;
81694a9a 14
f9788d30 15 .borderRadius(15px);
184a8d6d
AE
16}
17
09100ebd 18/* normal state */
184a8d6d
AE
19.button,
20input[type='reset']:not([disabled]),
21input[type='submit']:not([disabled]),
22input[type='button']:not([disabled]),
23button:not([disabled]) {
ecbd8a0b
MW
24 background-color: @wcfButtonBackgroundColor;
25 border-color: @wcfButtonBorderColor;
184a8d6d 26 color: @wcfButtonColor;
184a8d6d
AE
27 text-decoration: none;
28
184a8d6d 29 .textShadow(@wcfButtonBackgroundColor);
184a8d6d
AE
30}
31
32/* primary */
33.button.buttonPrimary,
34input[type='submit']:not([disabled]),
35input[type='button']:not([disabled]).buttonPrimary,
36button:not([disabled]).buttonPrimary {
ecbd8a0b
MW
37 background-color: @wcfButtonPrimaryBackgroundColor;
38 border-color: @wcfButtonPrimaryBorderColor;
184a8d6d 39 color: @wcfButtonPrimaryColor;
f9788d30 40 font-weight: bold;
184a8d6d 41
09100ebd 42 .textShadow(@wcfButtonPrimaryBackgroundColor);
556973c1
MW
43
44 .icon {
45 color: @wcfButtonPrimaryColor;
46 }
184a8d6d
AE
47}
48
49/* hover */
50.button:hover,
51input[type='reset']:not([disabled]):hover,
52input[type='submit']:not([disabled]):hover,
53input[type='button']:not([disabled]):hover,
54button:not([disabled]):hover {
ecbd8a0b
MW
55 background-color: @wcfButtonHoverBackgroundColor;
56 border-color: @wcfButtonHoverBorderColor;
184a8d6d
AE
57 color: @wcfButtonHoverColor;
58 text-decoration: none;
0db0396f 59 z-index: 100;
184a8d6d 60
09100ebd 61 .textShadow(@wcfButtonHoverBackgroundColor);
556973c1
MW
62
63 .icon {
64 color: @wcfButtonHoverColor;
65 }
184a8d6d
AE
66}
67
f9788d30
K
68/* primary hover */
69.button.buttonPrimary:hover,
70input[type='submit']:not([disabled]):hover,
71input[type='button']:not([disabled]).buttonPrimary:hover,
72button:not([disabled]).buttonPrimary:hover {
73 background-color: @wcfButtonPrimaryHoverBackgroundColor;
74 border-color: @wcfButtonPrimaryHoverBorderColor;
75 color: @wcfButtonPrimaryHoverColor;
76
77 .textShadow(@wcfButtonPrimaryHoverBackgroundColor);
556973c1
MW
78
79 .icon {
80 color: @wcfButtonPrimaryHoverColor;
81 }
f9788d30
K
82}
83
09100ebd
MW
84/* disabled state */
85input[type='reset']:disabled,
86input[type='submit']:disabled,
87input[type='button']:disabled,
88button:disabled {
90a67f4f
MW
89 background-color: @wcfButtonBackgroundColor;
90 border-color: @wcfButtonBorderColor;
91 color: lighten(@wcfButtonColor, 10%);
09100ebd 92 cursor: not-allowed;
90a67f4f 93 text-decoration: none;
09100ebd 94
09100ebd
MW
95 .textShadow(@wcfButtonBackgroundColor);
96}
97
16a821cd
MW
98/* active (permanently) */
99.button.active,
100input[type='button'].active,
101button.active,
102.button.active:hover,
103input[type='button'].active:hover,
104button.active:hover {
90a67f4f 105 background-color: @wcfButtonColor;
16a821cd 106 border-color: darken(@wcfButtonColor, 5%);
90a67f4f 107 color: @wcfButtonBackgroundColor;
16a821cd 108
90a67f4f
MW
109 .boxShadowInset(0, 1px, rgba(0, 0, 0, .1), 1px);
110 .textShadow(@wcfButtonColor);
556973c1
MW
111
112 .icon {
113 color: @wcfButtonBackgroundColor;
114
115 .textShadow(@wcfButtonColor);
116 }
16a821cd
MW
117}
118
09100ebd
MW
119/* button list */
120.buttonList {
121 > li {
425b4be9
MW
122 display: inline-block;
123
124 > .button {
125 margin: 0;
126 }
09100ebd
MW
127 }
128}
129
0db0396f
MW
130/* button group */
131.buttonGroup {
132 > li {
133 display: inline-block;
134
135 > .button {
136 margin: 0 0 0 -1px;
137
138 .borderRadius(0);
139 }
140
141 &:first-child {
142 > .button {
143 border-top-left-radius: 15px;
144 border-bottom-left-radius: 15px;
145 }
146 }
147
148 &:last-child {
149 > .button {
150 border-top-right-radius: 15px;
151 border-bottom-right-radius: 15px;
152 }
153 }
154 }
155}
156
09100ebd
MW
157/* sidebar buttons */
158.sidebar {
159 button,
160 input[type='reset'],
161 input[type='submit'],
162 input[type='button'],
163 .button {
5b5d0582
MW
164 font-size: @wcfSmallFontSize;
165 padding: 5px 11px;
09100ebd
MW
166 }
167}
168
0db0396f 169/* small buttons */
c3e8e6e0 170button.small,
5b5d0582
MW
171.button.small {
172 font-size: @wcfSmallFontSize;
0db0396f 173 min-height: 13px;
5b5d0582 174 padding: 5px 11px;
f2391e62
MW
175
176 .borderRadius(3px);
5b5d0582
MW
177}
178
09100ebd 179/* button icons */
556973c1
MW
180.button > .icon {
181 margin: -1px -5px;
0db0396f
MW
182
183 + span {
184 margin-left: 6px;
185 }
186}