From f805aeafd2040b8e2b9500bc51772c14ac1b4bad Mon Sep 17 00:00:00 2001 From: Mihail Geshoski Date: Fri, 28 Mar 2025 12:56:39 +0800 Subject: [PATCH] MDL-85046 theme_boost: Fix the spacing in the select_menu component Adds padding on the .dropdown-item element to fix the lack of spacing between the 'active' indicator and the item in the select_menu component. Also converts some of the hard-coded padding to use existing spacer definitions. --- theme/boost/scss/moodle/core.scss | 9 +++++++-- theme/boost/style/moodle.css | 5 ++++- theme/classic/style/moodle.css | 5 ++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/theme/boost/scss/moodle/core.scss b/theme/boost/scss/moodle/core.scss index 4654a772372..ce58c6f9e2c 100644 --- a/theme/boost/scss/moodle/core.scss +++ b/theme/boost/scss/moodle/core.scss @@ -3003,8 +3003,13 @@ body.dragging { padding-left: 2.5rem; } } - .dropdown-item[aria-selected="true"] { - font-weight: bold; + + .dropdown-item { + padding: map-get($spacers, 1) map-get($spacers, 4); + + [aria-selected="true"] { + font-weight: bold; + } } } diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index c1e1dfcab4d..ed233bb5ac0 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -28468,7 +28468,10 @@ body.dragging .dragging { .select-menu ul[role=group] .dropdown-item { padding-left: 2.5rem; } -.select-menu .dropdown-item[aria-selected=true] { +.select-menu .dropdown-item { + padding: 0.25rem 1.5rem; +} +.select-menu .dropdown-item [aria-selected=true] { font-weight: bold; } diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index 4fee6887100..365fa4da81b 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -28468,7 +28468,10 @@ body.dragging .dragging { .select-menu ul[role=group] .dropdown-item { padding-left: 2.5rem; } -.select-menu .dropdown-item[aria-selected=true] { +.select-menu .dropdown-item { + padding: 0.25rem 1.5rem; +} +.select-menu .dropdown-item [aria-selected=true] { font-weight: bold; }