From 1ab6151151f3fe1995388f3987b2250203a829af Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Tue, 4 Jun 2024 14:34:48 +0100 Subject: [PATCH] MDL-82086 theme_boost: consistent selector for textarea form controls. In a similar vein to 31f6039635, we shouldn't assume form controls are always descendents of `.mform` (e.g. the messaging drawer input). --- theme/boost/scss/moodle/forms.scss | 14 ++++++++------ theme/boost/style/moodle.css | 6 +++--- theme/classic/style/moodle.css | 6 +++--- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/theme/boost/scss/moodle/forms.scss b/theme/boost/scss/moodle/forms.scss index d96942bfbbf..84e318729f4 100644 --- a/theme/boost/scss/moodle/forms.scss +++ b/theme/boost/scss/moodle/forms.scss @@ -23,9 +23,6 @@ } .mform .d-flex { - textarea.form-control { - width: 100%; - } .fitem { margin: 0.1rem 0.25rem 0.1rem 0 !important; /* stylelint-disable-line declaration-no-important */ } @@ -37,9 +34,14 @@ } // Override the default bootstrap form-control width. -.d-flex > .form-control { - width: auto; - max-width: 100%; +.d-flex { + & > .form-control { + width: auto; + max-width: 100%; + } + & > textarea.form-control { + width: 100%; + } } // Override the default bootstrap custom-select width. diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 2ef58243077..fdbca3bf207 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -32930,9 +32930,6 @@ body.path-question-type .mform fieldset.hidden { margin-bottom: 4px; } -.mform .d-flex textarea.form-control { - width: 100%; -} .mform .d-flex .fitem { margin: 0.1rem 0.25rem 0.1rem 0 !important; /* stylelint-disable-line declaration-no-important */ } @@ -32946,6 +32943,9 @@ body.path-question-type .mform fieldset.hidden { width: auto; max-width: 100%; } +.d-flex > textarea.form-control { + width: 100%; +} .custom-select { width: auto; diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index b8940e565d4..6b43fc7ab63 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -32930,9 +32930,6 @@ body.path-question-type .mform fieldset.hidden { margin-bottom: 4px; } -.mform .d-flex textarea.form-control { - width: 100%; -} .mform .d-flex .fitem { margin: 0.1rem 0.25rem 0.1rem 0 !important; /* stylelint-disable-line declaration-no-important */ } @@ -32946,6 +32943,9 @@ body.path-question-type .mform fieldset.hidden { width: auto; max-width: 100%; } +.d-flex > textarea.form-control { + width: 100%; +} .custom-select { width: auto;