fix userOptionCategoryList delete confirm message (#2059)
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / style / layout / form.scss
CommitLineData
f2b50825
AE
1input[type="date"],
2input[type="datetime"],
3input[type="email"],
4input[type="number"],
5input[type="password"],
6input[type="search"],
7input[type="text"],
8input[type="url"],
9select,
10textarea {
d40daae6 11 @include input;
f2b50825
AE
12}
13
a5968043
MW
14/* set placeholder color */
15input[type="date"],
16input[type="datetime"],
17input[type="email"],
18input[type="number"],
19input[type="password"],
20input[type="search"],
21input[type="text"],
22input[type="url"] {
23 &::-webkit-input-placeholder { /* WebKit browsers */
852e099f 24 color: $wcfInputPlaceholder;
a5968043
MW
25 }
26 &::-moz-placeholder { /* Mozilla Firefox 19+ */
852e099f 27 color: $wcfInputPlaceholder;
a5968043
MW
28 }
29 &:-ms-input-placeholder { /* Internet Explorer 10+ */
852e099f 30 color: $wcfInputPlaceholder;
a5968043 31 }
5d0e8b3f
AE
32
33 &:focus,
34 &:hover {
35 &::-webkit-input-placeholder { /* WebKit browsers */
36 color: $wcfInputPlaceholderActive;
37 }
38 &::-moz-placeholder { /* Mozilla Firefox 19+ */
39 color: $wcfInputPlaceholderActive;
40 }
41 &:-ms-input-placeholder { /* Internet Explorer 10+ */
42 color: $wcfInputPlaceholderActive;
43 }
44 }
a5968043
MW
45}
46
393c6d8f
MS
47input[type="search"] {
48 -webkit-appearance: none;
49}
50
f2b50825
AE
51textarea {
52 border-width: 1px;
53 width: 100%;
54
5908f54f 55 @include wcfFontDefault;
a1e91e22
MW
56
57 &[disabled],
58 &[readonly] {
59 background-color: $wcfInputDisabledBackground !important;
60 border-color: $wcfInputDisabledBorder !important;
61 color: $wcfInputDisabledText !important;
62 }
f2b50825
AE
63}
64
12f80644
AE
65select {
66 // The width is determined by the browser based upon the longest <option> contained,
67 // but this can cause the <select> to overflow the parent container. This is acceptable
68 // to some extent, but on mobile it can cause the entire site to have a horizontal
69 // scrollbar instead. Setting a `max-width` will cause the browser to respect the page
70 // boundaries and nicely wrap the displayed value instead.
71 max-width: 100%;
72}
73
f2b50825 74.selectDropdown {
08e72cab 75 max-width: 100%;
f2b50825
AE
76 position: relative;
77
a183048b
AE
78 // force inline-block to mimic the <select> display and make both its dimensions
79 // and flow behavior more predictable; !important is required to prevent styles
80 // applied to generic <label> in certain cases such as within <dd>
81 display: inline-block !important;
82
f2b50825
AE
83 &::after {
84 content: $fa-var-caret-down;
85 display: block;
86 font-family: FontAwesome;
87 font-size: 14px;
88 pointer-events: none;
89 position: absolute;
90 right: 7px;
a183048b
AE
91 top: 50%;
92 transform: translateY(-50%);
f2b50825
AE
93 }
94
95 > select {
96 padding-right: 18px;
97
98 -webkit-appearance: none;
99 -moz-appearance: none;
100 appearance: none;
101 }
102}
103
e2368a74 104
f2b50825
AE
105
106.formSubmit {
107 text-align: center;
108
109 &:not(:first-child) {
487db634 110 margin-top: 30px;
f2b50825
AE
111 }
112
f216765b 113 @include screen-xs {
0923f8db
AE
114 > .button,
115 > button,
116 > input {
117 display: block;
118 padding: 7px 10px;
119 width: 100%;
120
121 &:not(:first-child) {
122 margin-top: 10px;
123 }
124 }
f2b50825 125 }
f216765b
AE
126
127 @include screen-sm-up {
128 > :not(:first-child) {
129 margin-left: 10px;
130 }
131 }
f2b50825
AE
132}
133
f027ba61 134.inputAddon {
f2b50825
AE
135 display: flex;
136
137 &:not(:last-child) {
138 margin-bottom: 5px;
139 }
140
dfef03a8 141 > .inputPrefix,
f2b50825 142 > .inputSuffix {
0de1d7fb
AE
143 align-items: center;
144 display: flex;
f2b50825
AE
145 flex: 0 0 auto;
146
147 &.button {
148 border-radius: 0;
f2b50825 149 }
f027ba61
AE
150
151 &:not(.button) {
152 background-color: $wcfButtonBackground;
153 border: 1px solid $wcfButtonBorder;
154 color: $wcfButtonText;
155 cursor: default;
f027ba61
AE
156 padding: 3px 5px;
157 }
f2b50825
AE
158 }
159
dfef03a8
AE
160 > .inputPrefix {
161 margin-right: 5px;
162 }
163
164 > .inputSuffix {
165 margin-left: 5px;
166 }
167
f027ba61 168 input {
f2b50825 169 flex: 1 auto;
dfef03a8
AE
170
171 & + .inputPrefix {
172 margin-left: 5px;
173 }
f2b50825
AE
174 }
175}
176
f027ba61
AE
177.inputAddonTextarea {
178 flex-wrap: wrap;
179
180 > .inputPrefix.button {
181 border-bottom-width: 0;
182 border-radius: 0;
183 }
184
185 > textarea {
186 flex: 0 0 100%;
187 }
188}
189
190.inputAddon input,
191input {
f027ba61
AE
192 &.tiny {
193 flex-grow: 0;
194 width: 80px;
195 }
196
87275aa7
MW
197 &.long {
198 min-width: 150px;
199 width: 100%;
f027ba61
AE
200 }
201
87275aa7
MW
202 @include screen-xs {
203 &.short {
204 flex-grow: 0;
205 width: 150px;
206 }
207
208 &.medium {
209 min-width: 150px;
210 width: 100%;
211 }
f027ba61
AE
212 }
213
87275aa7
MW
214 @include screen-sm-up {
215 &.short {
216 flex-grow: 0;
217 min-width: 80px;
218 width: 10%;
219 }
220
221 &.medium {
222 flex-grow: 0;
223 min-width: 150px;
224 width: 30%;
225 }
f027ba61 226 }
f2b50825 227}
a44dd9c3 228
771df927
AE
229.formError {
230 dt {
231 color: rgba(204, 0, 1, 1) !important;
232 }
233
234 input,
235 select,
236 textarea {
237 border-color: rgba(204, 0, 1, 1) !important;
238 }
239}
240
a44dd9c3
AE
241/* grid-based form controls */
242.formGrid {
243 dt {
244 display: none;
245 }
246
247 .selectDropdown,
248 select {
249 width: 100%;
250 }
251}