diff --git a/.upgradenotes/MDL-85240-2025051111233235.yml b/.upgradenotes/MDL-85240-2025051111233235.yml new file mode 100644 index 00000000000..3b2a43bc5bb --- /dev/null +++ b/.upgradenotes/MDL-85240-2025051111233235.yml @@ -0,0 +1,10 @@ +issueNumber: MDL-85240 +notes: + qtype_multichoice: + - message: >- + Restrict override of margin-bottom for fitem_id_answer_* and + fitem_id_fraction_* divs to own edit form. Question type + plugins currently benefitting from the unlimited style override + will need to change their styles.css accordingly. An example + can be found in calculatedmulti's style sheet. + type: changed diff --git a/question/type/calculatedmulti/styles.css b/question/type/calculatedmulti/styles.css index cf0413c41a1..a8fbf322de9 100644 --- a/question/type/calculatedmulti/styles.css +++ b/question/type/calculatedmulti/styles.css @@ -27,3 +27,10 @@ width: 14px; flex-shrink: 0; } + +/* stylelint-disable declaration-no-important */ +body#page-question-type-calculatedmulti div[id^="fitem_id_answer_"].mb-3, +body#page-question-type-calculatedmulti div[id^="fitem_id_fraction_"].mb-3 { + margin-bottom: 0 !important; +} +/* stylelint-enable declaration-no-important */ diff --git a/question/type/multichoice/styles.css b/question/type/multichoice/styles.css index f0efa937dfe..712a2774ddf 100644 --- a/question/type/multichoice/styles.css +++ b/question/type/multichoice/styles.css @@ -66,10 +66,8 @@ body#page-question-type-multichoice div[id^=fitem_id_][id*=feedback_] { } /* stylelint-disable declaration-no-important */ - -div[id^="fitem_id_answer_"].mb-3, -div[id^="fitem_id_fraction_"].mb-3 { +body#page-question-type-multichoice div[id^="fitem_id_answer_"].mb-3, +body#page-question-type-multichoice div[id^="fitem_id_fraction_"].mb-3 { margin-bottom: 0 !important; } /* stylelint-enable declaration-no-important */ -