Elgg  Version master
forms.css.php
Go to the documentation of this file.
1 <?php ?>
2 /* <style> /**/
7 /* ***************************************
8  Form Elements
9 *************************************** */
10 .elgg-form-body,
11 .elgg-form-body > div,
12 .elgg-form-body fieldset > div,
13 .elgg-field {
14  &:not(:last-child) {
15  margin-bottom: 1rem;
16  }
17 }
18 
19 .elgg-form-alt > .elgg-form-footer {
20  border-top: 1px solid $(border-color-soft);
21  padding: 10px 0;
22 }
23 
24 label, .elgg-field-label {
25  font-weight: 600;
26  font-size: 0.9rem;
27  line-height: 1.8rem;
28 }
29 
30 .elgg-field-label {
31  display: block;
32 }
33 
34 .elgg-field-disabled {
35  .elgg-field-label {
36  opacity: 0.6;
37  }
38 }
39 
40 .elgg-required-indicator {
41  font-size: 110%;
42  font-weight: bold;
43  color: $(state-danger-font-color);
44  display: inline;
45  padding: 0 5px;
46 }
47 
48 input, textarea {
49  border: 1px solid $(border-color-mild);
50  color: $(text-color-strong);
51  font-size: 1rem;
52  padding: 0.25rem 0.5rem;
53  line-height: normal;
54  width: 100%;
55  border-radius: 3px;
56 }
57 
58 input:disabled,
59 textarea:disabled,
60 select:disabled,
61 option:disabled {
62  cursor: not-allowed;
63 }
64 
65 textarea {
66  padding: 0.5rem;
67 }
68 
69 input[type=email],
70 input[type=password],
71 input[type=text],
72 input[type=number],
73 input[type=url],
74 input[type=color],
75 input[type=datetime-local],
76 input[type=month],
77 input[type=search],
78 input[type=tel],
79 input[type=week], {
80  height: 2.5rem;
81 }
82 
83 input[type=email]:focus,
84 input[type=password]:focus,
85 input[type=text]:focus,
86 input[type=number]:focus,
87 input[type=url]:focus,
88 input[type=color]:focus,
89 input[type=datetime-local]:focus,
90 input[type=month]:focus,
91 input[type=search]:focus,
92 input[type=tel]:focus,
93 input[type=week]:focus,
94 textarea:focus {
95  border: solid 1px $(border-color-strong);
96  background-color: $(background-color-soft);
97  /* We remove outlines from specific input types so we can leave the browser
98  defaults (like glows) for everything else */
99  outline: 0 none;
100 }
101 
102 input[type="checkbox"],
103 input[type="radio"] {
104  margin: 0 0.25rem 0 0;
105  padding: 0;
106  border: none;
107  width: auto;
108  vertical-align: middle;
109 }
110 
111 input[type="number"] {
112  -moz-appearance: textfield;
113 }
114 
115 .elgg-input-checkbox + label,
116 .elgg-input-checkbox + .elgg-field-label {
117  display: inline-block;
118 }
119 
120 .elgg-input-checkboxes.elgg-horizontal li,
121 .elgg-input-radios.elgg-horizontal li {
122  display: inline-block;
123  padding-right: 1rem;
124 }
125 
126 .elgg-color-box {
127  width: 1.0rem;
128  height: 1.0rem;
129  display: inline-block;
130  background-color: #ccc;
131  left: 5px;
132  top: 5px;
133  border: 1px solid #000;
134  border-radius: 3px;
135 }
136 
137 .elgg-input-color {
138  width: 4.5rem;
139 }
140 
141 <?php
142 echo elgg_view('elements/misc/checkbox_switch.css');
143 ?>
144 
145 select {
146  max-width: 100%;
147  border: 1px solid $(border-color-mild);
148  color: $(text-color-strong);
149  padding: 0.25rem 0.5rem;
150  line-height: 1.75rem;
151  vertical-align: middle;
152  border-radius: 3px;
153 }
154 
155 select:not([multiple]) {
156  height: 2.5rem;
157 }
158 
159 .elgg-form-account {
160  margin-bottom: 1rem;
161 }
162 
163 .elgg-input-radios label {
164  font-weight: normal;
165  font-size: 100%;
166 }
167 
168 .elgg-input-checkboxes {
169  label {
170  font-weight: normal;
171  font-size: 100%;
172  line-height: inherit;
173  }
174 
175  &.elgg-horizontal label > .elgg-input-checkbox {
176  vertical-align: baseline;
177  }
178 }
179 
180 .elgg-form-login, .elgg-form-account {
181  max-width: 40rem;
182  margin: 0 auto;
183 }
184 
185 .elgg-fieldset-has-legend {
186  border: 1px solid $(border-color-soft);
187  padding: 1rem;
188  margin-bottom: 1rem;
189 }
190 
191 @media $(media-phone-up) {
192  .elgg-fieldset-horizontal {
193  display: flex;
194 
195  > .elgg-field {
196  margin: 0 1rem 0 0;
197  vertical-align: top;
198 
199  display: flex;
200  flex-direction: column;
201 
202  &.elgg-field-stretch {
203  flex-basis: 1%;
204  flex-grow: 1;
205 
206  > .elgg-field-input {
207  width: 100%;
208  }
209  }
210 
211  &.elgg-field-horizontal {
212  flex-direction: row;
213  align-items: baseline;
214 
215  > *:not(:first-child) {
216  padding-left: 1rem;
217  }
218  }
219 
220  > .elgg-field-label {
221  align-items: center;
222  display: flex;
223  flex-shrink: 0;
224  }
225 
226  &:last-child {
227  margin-right: 0;
228  }
229  }
230 
231  &.elgg-fieldset-wrap {
232  flex-wrap: wrap;
233 
234  > .elgg-field {
235  margin-bottom: 0.5rem;
236  }
237  }
238 
239  &.elgg-justify-right {
240  justify-content: flex-end;
241 
242  > .elgg-field {
243  margin: 0 0 0 1rem;
244  }
245  }
246 
247  &.elgg-justify-center {
248  justify-content: center;
249 
250  > .elgg-field {
251  margin: 0 5px;
252  }
253  }
254  }
255 }
256 
257 <?php
258 echo elgg_view('elements/components/autocomplete.css', $vars);
259 echo elgg_view('elements/components/datepicker.css', $vars);
260 echo elgg_view('input/entitypicker.css', $vars);
261 echo elgg_view('input/tags.css', $vars);
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
$site email
Definition: settings.php:16
$vars
Definition: theme.php:5
$data label
Definition: default.php:22