From 31f603963590871fcff96682b2746ca94514f4fc Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Thu, 2 May 2024 23:10:28 +0100 Subject: [PATCH] MDL-81779 theme_boost: more liberal selector for form-control elements. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are various pages (e.g. many related to permissions), where the form element is not a descendent of `.mform` - so the previous selector never matched them and led to unstyled inputs. Co-authored-by: Mikel Martín --- theme/boost/scss/moodle/forms.scss | 11 ++++++----- theme/boost/style/moodle.css | 9 +++++---- theme/classic/style/moodle.css | 9 +++++---- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/theme/boost/scss/moodle/forms.scss b/theme/boost/scss/moodle/forms.scss index 5e2d63e99f1..d96942bfbbf 100644 --- a/theme/boost/scss/moodle/forms.scss +++ b/theme/boost/scss/moodle/forms.scss @@ -23,11 +23,6 @@ } .mform .d-flex { - // Override the default bootstrap form-control width. - .form-control { - width: auto; - max-width: 100%; - } textarea.form-control { width: 100%; } @@ -41,6 +36,12 @@ } } +// Override the default bootstrap form-control width. +.d-flex > .form-control { + width: auto; + max-width: 100%; +} + // Override the default bootstrap custom-select width. .custom-select { width: auto; diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 96d909ca188..d66706c66f6 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -32933,10 +32933,6 @@ body.path-question-type .mform fieldset.hidden { margin-bottom: 4px; } -.mform .d-flex .form-control { - width: auto; - max-width: 100%; -} .mform .d-flex textarea.form-control { width: 100%; } @@ -32949,6 +32945,11 @@ body.path-question-type .mform fieldset.hidden { margin-right: 0; } +.d-flex > .form-control { + width: auto; + max-width: 100%; +} + .custom-select { width: auto; max-width: 100%; diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index e488a18b892..55a60136cd4 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -32933,10 +32933,6 @@ body.path-question-type .mform fieldset.hidden { margin-bottom: 4px; } -.mform .d-flex .form-control { - width: auto; - max-width: 100%; -} .mform .d-flex textarea.form-control { width: 100%; } @@ -32949,6 +32945,11 @@ body.path-question-type .mform fieldset.hidden { margin-right: 0; } +.d-flex > .form-control { + width: auto; + max-width: 100%; +} + .custom-select { width: auto; max-width: 100%;