Skip to content

Commit

Permalink
MDL-42887 Form collapsing CSS fixes.
Browse files Browse the repository at this point in the history
.fcontainer is not guaranteed to be in the form - we still need something else
for this selector to make it specific enough - so have replaced with #region-main (required).

Also - redid the question edit styles to be specific enough.
  • Loading branch information
Damyon Wiese committed Nov 15, 2013
1 parent 2b6344c commit f059744
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 29 deletions.
18 changes: 9 additions & 9 deletions theme/base/style/core.css
Expand Up @@ -331,44 +331,44 @@ input#id_externalurl {direction:ltr;}
/**
* Show the labels above text editors and file managers except on wide screens.
*/
.mform .fcontainer .fitem .fitemtitle label {
#region-main .mform .fitem .fitemtitle label {
font-weight: bold;
}
@media (max-width: 1199px) {
.mform .fcontainer .fitem .fitemtitle {
#region-main .mform .fitem .fitemtitle {
display: block;
margin-top: 4px;
margin-bottom: 4px;
text-align: left;
width: 100%;
}
.dir-rtl .mform .fcontainer .fitem .fitemtitle {
.dir-rtl #region-main .mform .fitem .fitemtitle {
text-align: right;
}

.mform .fcontainer .fitem .felement {
#region-main .mform .fitem .felement {
margin-left: 0;
width: 100%;
float: left;
margin-bottom: 6px;
padding-left: 0;
padding-right: 0;
}
.dir-rtl .mform .fcontainer .fitem .felement {
.dir-rtl #region-main .mform .fitem .felement {
margin-right: 0;
float: right;
padding-right: 0;
padding-left: 0;
}
.mform .fcontainer .fitem_fcheckbox .fitemtitle,
.mform .fcontainer .fitem_fcheckbox .felement {
#region-main .mform .fitem_fcheckbox .fitemtitle,
#region-main .mform .fitem_fcheckbox .felement {
display: inline-block;
width: auto;
}
.dir-rtl .mform .fcontainer .fitem_fcheckbox .felement {
.dir-rtl #region-main .mform .fitem_fcheckbox .felement {
float: right;
}
.mform .fcontainer .fitem_fcheckbox .felement {
#region-main .mform .fitem_fcheckbox .felement {
padding: 6px;
}
}
Expand Down
10 changes: 5 additions & 5 deletions theme/base/style/question.css
Expand Up @@ -131,21 +131,21 @@ body.path-question-type .fitem_fgroup .accesshide {font: inherit;left: 0;positio
}

/* Add a little padding to the answer sections of edit question forms. */
.path-question-type.editing #id_answerhdr .fitem .fitemtitle,
.path-question-type.editing #id_answerhdr .fitem .felement {
.path-question-type #id_answerhdr .fitem .fitemtitle,
.path-question-type #id_answerhdr .fitem .felement {
margin-left: 6px;
margin-right: 6px;
}
.path-question-type.editing #id_answerhdr .fitem_feditor .felement {
.path-question-type #id_answerhdr .fitem_feditor .felement {
margin-left: 0px;
margin-right: 0px;
}
@media (min-width: 1200px) {
.path-question-type.editing #id_answerhdr .fitem_feditor .felement {
.path-question-type #id_answerhdr .fitem_feditor .felement {
margin-left: 16%;
margin-right: 0px;
}
.dir-rtl .path-question-type.editing #id_answerhdr .fitem_feditor .felement {
.dir-rtl .path-question-type #id_answerhdr .fitem_feditor .felement {
margin-right: 16%;
margin-left: 0px;
}
Expand Down
22 changes: 12 additions & 10 deletions theme/bootstrapbase/less/moodle/forms.less
Expand Up @@ -386,42 +386,44 @@ fieldset.coursesearchbox label {
/**
* Show the labels above text editors and file managers except on wide screens.
*/
.mform .fcontainer .fitem .fitemtitle label {
#region-main .mform .fitem .fitemtitle label {
font-weight: bold;
}
@media (max-width: 1199px) {
.mform .fcontainer .fitem .fitemtitle {
#region-main .mform .fitem .fitemtitle {
display: block;
margin-top: 4px;
margin-bottom: 4px;
text-align: left;
width: 100%;
}
.dir-rtl .mform .fcontainer .fitem .fitemtitle {
.dir-rtl #region-main .mform .fitem .fitemtitle {
text-align: right;
}

.mform .fcontainer .fitem .felement {
#region-main .mform .fitem .felement {
margin-left: 0;
width: 100%;
float: left;
margin-bottom: 6px;
padding-left: 0;
padding-right: 0;
}
.dir-rtl .mform .fcontainer .fitem .felement {
.dir-rtl #region-main .mform .fitem .felement {
margin-right: 0;
padding-left: 0;
float: right;
padding-right: 0;
padding-left: 0;
}
.mform .fcontainer .fitem_fcheckbox .fitemtitle,
.mform .fcontainer .fitem_fcheckbox .felement {
#region-main .mform .fitem_fcheckbox .fitemtitle,
#region-main .mform .fitem_fcheckbox .felement {
display: inline-block;
width: auto;
}
.dir-rtl .mform .fcontainer .fitem_fcheckbox .felement {
.dir-rtl #region-main .mform .fitem_fcheckbox .felement {
float: right;
}
.mform .fcontainer .fitem_fcheckbox .felement {
#region-main .mform .fitem_fcheckbox .felement {
padding: 6px;
}
}
6 changes: 3 additions & 3 deletions theme/bootstrapbase/less/moodle/question.less
Expand Up @@ -462,12 +462,12 @@ a#hidebankcmd {
}

/* Add a little padding to the answer sections of edit question forms. */
.path-question-type.editing #id_answerhdr .fitem .fitemtitle,
.path-question-type.editing #id_answerhdr .fitem .felement {
.path-question-type #id_answerhdr .fitem .fitemtitle,
.path-question-type #id_answerhdr .fitem .felement {
margin-left: 6px;
margin-right: 6px;
}
.path-question-type.editing #id_answerhdr .fitem_feditor .felement {
.path-question-type #id_answerhdr .fitem_feditor .felement {
margin-left: 0px;
margin-right: 0px;
}
4 changes: 2 additions & 2 deletions theme/bootstrapbase/style/moodle.css

Large diffs are not rendered by default.

0 comments on commit f059744

Please sign in to comment.