From 8c16d50e40e0efdbd2175fef1f55b0bd7045f13c Mon Sep 17 00:00:00 2001 From: Peter Date: Fri, 21 Dec 2018 08:42:27 +0800 Subject: [PATCH] MDL-64450 mod_lesson: Update the css for lesson forms * Reduce the width for the mediaplugin when displayed in forms * Correct the css to exclude mediaplugin when applying styles --- theme/boost/scss/moodle/forms.scss | 5 +++++ theme/boost/style/moodle.css | 3 +++ theme/bootstrapbase/less/moodle/forms.less | 16 +++++++++++----- theme/bootstrapbase/style/moodle.css | 10 ++++++---- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/theme/boost/scss/moodle/forms.scss b/theme/boost/scss/moodle/forms.scss index 469e034a3f1..ad9e889bdf9 100644 --- a/theme/boost/scss/moodle/forms.scss +++ b/theme/boost/scss/moodle/forms.scss @@ -169,6 +169,11 @@ div.backup-section + form { direction: ltr; } +// Reduce the mediaplugin width when using inside forms. +.que.match .mediaplugin { + width: 50vw; +} + /* rtl:ignore */ #page-admin-grade-edit-scale-edit .error input#id_name { margin-right: 170px; diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index a16db3b1024..400696a8c02 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -15116,6 +15116,9 @@ div.backup-section + form { text-align: left; direction: ltr; } +.que.match .mediaplugin { + width: 50vw; } + /* rtl:ignore */ #page-admin-grade-edit-scale-edit .error input#id_name { margin-right: 170px; } diff --git a/theme/bootstrapbase/less/moodle/forms.less b/theme/bootstrapbase/less/moodle/forms.less index b6b2bc6c0dc..fbca7410311 100644 --- a/theme/bootstrapbase/less/moodle/forms.less +++ b/theme/bootstrapbase/less/moodle/forms.less @@ -48,17 +48,23 @@ form { display: none; } +// MDL-63512 Override to handle issues in clean where the video styling is off. .mform .fitem .fitemtitle { - div { + & > div:not(.mediaplugin) div { display: inline; } - // MDL-63512 Override to handle issues in clean where the video styling is off. - .mediaplugin, - .mediaplugin div { - display: block; + // MDL-64450 Override for videos so they don't appear off the screen. + .mediaplugin > div { + margin: 0; } } + +// Reduce the mediaplugin width when using inside forms. +.que.match .mediaplugin { + width: 50vw; +} + #adminsettings .error, .loginpanel .error, .mform .error { diff --git a/theme/bootstrapbase/style/moodle.css b/theme/bootstrapbase/style/moodle.css index 1752bb420d8..e83216ae92f 100644 --- a/theme/bootstrapbase/style/moodle.css +++ b/theme/bootstrapbase/style/moodle.css @@ -16591,12 +16591,14 @@ form { .jsenabled .mform .collapsed .fcontainer { display: none; } -.mform .fitem .fitemtitle div { +.mform .fitem .fitemtitle > div:not(.mediaplugin) div { display: inline; } -.mform .fitem .fitemtitle .mediaplugin, -.mform .fitem .fitemtitle .mediaplugin div { - display: block; +.mform .fitem .fitemtitle .mediaplugin > div { + margin: 0; +} +.que.match .mediaplugin { + width: 50vw; } #adminsettings .error, .loginpanel .error,