2 * Moodle forms HTML isn't changeable via renderers (yet?) so this
3 * .less file imports styles from the bootstrap @variables file and
4 * adds them to the existing Moodle form CSS ids and classes.
11 .mform fieldset .advancedbutton {
14 .jsenabled .mform .containsadvancedelements .advanced {
17 .mform .containsadvancedelements .advanced.show {
20 .mform fieldset.group {
23 .mform fieldset.error {
24 border: 1px solid @errorText;
27 #adminsettings span.error {
28 display: inline-block;
29 border: 1px solid @errorBorder;
31 background-color: @errorBackground;
35 .mform fieldset.collapsible legend a.fheader {
36 padding: 0 5px 0 20px;
38 background: url([[pix:t/expanded]]) left center no-repeat;
40 .mform fieldset.collapsed legend a.fheader {
42 background-image: url([[pix:t/collapsed_rtl]]);
45 background-image: url([[pix:t/collapsed]]);
47 .jsenabled .mform .collapsed .fcontainer {
51 .mform .fitem .fitemtitle div {
54 #adminsettings .error,
59 .mform .fdescription.required {
60 margin-left: @horizontalComponentOffset;
66 .mform .fpassword .unmask {
67 display: inline-block;
73 display: inline-block;
77 display: inline-block;
83 .mform .ftextarea #id_alltext {
100 .mform .fcheckbox input {
103 .mform .fcheckbox > span,
104 .mform .fradio > span,
105 .mform .fgroup > span,
106 .mform .fadvcheckbox > span {
107 display: inline-block;
110 .mform .fitem fieldset.fgroup label,
111 .mform fieldset.fdate_selector label {
115 .mform .helplink img {
119 .mform legend .helplink img {
122 .singleselect label {
130 // Make the submit button align with the .custom-select element.
131 .custom-select + input[type="submit"] {
135 #portfolio-add-button {
139 // Copying in Bootstrap styles.
142 .form-horizontal .control-group;
144 // Theres's a mysterious extra 10px inside this item,
145 // so reduce margin by 10px from 20px standard to compensate.
147 .form-item .form-label,
148 .mform .fitem div.fitemtitle {
149 .form-horizontal .control-label
152 .form-label .form-shortname {
155 .form-label .form-shortname {
156 font-size: @fontSizeMini;
159 .form-item .form-setting,
160 .form-item .form-description,
161 .mform .fitem .felement,
162 #page-mod-forum-search .c1 {
163 .form-horizontal .controls
165 .form-inline label:not(.sr-only):not(.accesshide) + select {
169 .formsettingheading {
170 .form-horizontal .help-block
172 // Moodle doesn't differentiate between what Bootstrap calls
173 // .uneditable-inputs and form help text. Styling them both as
174 // uneditable looks ugly, styling both as form help is fairly
175 // subtle in it's impact. Going for the latter as the best option.
176 .form-item .form-description,
181 .form-item .form-description {
184 .fitem .fstaticlabel {
188 // Pale grey container for submit buttons.
189 table#form td.submit,
191 .path-admin .buttons,
192 #fitem_id_submitbutton,
193 .fp-content-center form + div,
194 div.backup-section + form,
195 #fgroup_id_buttonar {
199 .path-admin .buttons,
200 .form-buttons { // Add back the padding it would usually get from being inside a .form-horizontal.
201 padding-left: @horizontalComponentOffset;
203 .form-item .form-setting .form-checkbox.defaultsnext {
204 // Need to specify .defaultsnext and the .form-checkbox class
205 // is somewhat randomly re-used on various actual checkboxes
206 // throughout the admin forms, instead of on the wrapper div.
207 margin-top: 5px; // Push down checkboxes to align.
208 display: inline-block; // So above style sticks.
212 // Copied from bootstrap/forms.less tag legend.
216 margin-bottom: @baseLineHeight;
217 font-size: @baseFontSize * 1.5;
218 line-height: @baseLineHeight * 2;
221 border-bottom: 1px solid #e5e5e5;
224 .mform legend a:hover {
226 text-decoration: none;
229 #page-grade-edit-outcome-course .courseoutcomes {
234 #page-grade-edit-outcome-course .courseoutcomes td {
239 // Workaround for repository pop-up because the : are outside the label,
240 // can/should be fixed in filemanager renderers.
241 display: inline-block;
244 // Checkbox labels. Bootstrap puts the associated checkbox inside the label.
245 // Moodle puts it beside the label, so we need to make it inline-block
246 // to keep it on the same horizontal level.
247 input[type="radio"] + label,
248 input[type="checkbox"] + label {
253 input[type="checkbox"] {
254 margin-top: -4px; // Dodgy hack, must be better way.
258 display: inline-block;
264 .form-item .form-label label {
267 .felement.ffilepicker {
270 div#dateselector-calendar-panel {
271 z-index: 3100; /* Set higher than the z-index of the filemanager - see MDL-39047. */
274 fieldset.coursesearchbox label {
279 * Show the labels above text editors and file managers except on wide screens.
281 #region-main .mform:not(.unresponsive) .fitem .fitemtitle label {
284 .makeFormsVertical() {
285 &:not(.unresponsive) {
313 display: inline-block;
318 display: inline-block;
326 display: inline-block;
337 * Forms marked as vertical always display this way;
339 .mform.full-width-labels {
344 * Make forms vertical when the screen is less than 1200px;
346 @media (max-width: 1199px) {
347 body #region-main .mform {
354 * Make forms vertical when the screen is less than 1474px AND both side-pre and side-post contain blocks.
355 * This is an extra special media rule.
356 * It causes forms to show vertically when the screen size is calculated as:
357 * 1199px + (1199px * 23%)
358 * Where 23% is the width of span3
359 * Full calculation is:
360 * @maxWidthForVerticalForms: 1199px * (unit(((@fluidGridColumnWidth1200 * 3) +
361 * (@fluidGridGutterWidth * (3 - 1)))) / 100) + 1199px;
363 @maxWidthForVerticalForms: 1474px;
365 @media (max-width: @maxWidthForVerticalForms) {
366 .used-region-side-pre.used-region-side-post #region-main .mform {
371 /* Section and module editing forms contain special JS components for the
372 availability system (if enabled). */
373 #id_availabilityconditionsjson[aria-hidden=true],
374 .availability-field [aria-hidden=true] {
378 .availability-delete {
381 /* Eye icons in front of child lists are aligned specially. */
382 .availability-list > .availability-eye img {
386 .availability-plugincontrols {
388 padding: 2px 0 0 4px;
389 background: none repeat scroll 0% 0% @wellBackground;
390 border: 1px solid @grayLighter;
392 display: inline-block;
399 .availability-field .availability-plugincontrols .availability-group select {
402 /* Nested section is grey. */
403 .availability-childlist > .availability-inner {
404 display: inline-block;
405 background: @wellBackground;
406 border: 1px solid @grayLighter;
411 /* Second (and more) levels of nested sections are white. */
412 .availability-childlist .availability-childlist > .availability-inner {
415 /* Default form styling colours all text red. With availability conditions
416 this looks excessive as we show 'Invalid' markers in specific places. */
417 .mform .error .availability-field {
421 /* This dialogue is used to add an availability condition. */
422 .availability-dialogue {
423 .moodle-dialogue .moodle-dialogue-bd {
434 list-style-type: none;
437 border-bottom: 1px solid @grayLighter;
451 .availability-buttons button {
458 /* Revert to the non-fixed width where a textarea has the number of columns
459 specified, or an input has it's size specified. */
465 /* Custom styles for autocomplete form element */
467 [data-fieldtype=autocomplete] select,
468 [data-fieldtype=tags] select,
469 select.form-autocomplete-original-select {
473 height: 3 * @baseLineHeight + @baseFontSize / 2;
475 margin-bottom: 0.2em;
480 .form-autocomplete-container {
481 display: inline-block;
484 .form-autocomplete-selection {
486 min-height: @baseLineHeight + @baseFontSize / 2;
488 .form-autocomplete-multiple [role=listitem] {
492 .form-autocomplete-suggestions {
494 background-color: white;
495 border: 2px solid @grayLighter;
505 .form-autocomplete-suggestions li {
506 list-style-type: none;
512 .form-autocomplete-suggestions li:hover {
513 background-color: lighten(@dropdownLinkBackgroundActive, 15%);
514 color: @dropdownLinkColorActive;
516 .form-autocomplete-suggestions li[aria-selected=true] {
517 background-color: darken(@navbarBackground, 5%);
521 .form-autocomplete-downarrow {
529 .form-autocomplete-selection:focus {
532 .form-autocomplete-selection [data-active-selection=true] {
537 textarea[data-auto-rows] {
541 div[data-passwordunmask="wrapper"] {
547 // Styles for the JS file types browser provided by the "filetypes" element.
548 [data-filetypesbrowserbody] {
549 [aria-expanded="false"] > [role="group"],
550 [aria-expanded="false"] [data-filetypesbrowserfeature="hideifcollapsed"],
551 [aria-expanded="true"] [data-filetypesbrowserfeature="hideifexpanded"] {