From 2a4f96e62830e06f0cbd6b78ad2fd8c71adced5d Mon Sep 17 00:00:00 2001 From: Laurent David Date: Wed, 11 Mar 2026 13:10:08 +0100 Subject: [PATCH] MDL-88072 core_course: Tighten subsection content spacing --- public/theme/boost/scss/moodle/course.scss | 9 ++++++++- public/theme/boost/style/moodle.css | 11 +++++++++-- public/theme/classic/style/moodle.css | 11 +++++++++-- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/public/theme/boost/scss/moodle/course.scss b/public/theme/boost/scss/moodle/course.scss index 5d885e05331..a69ca74bdf7 100644 --- a/public/theme/boost/scss/moodle/course.scss +++ b/public/theme/boost/scss/moodle/course.scss @@ -795,7 +795,7 @@ $divider-hover-color: $primary !default; margin-top: 0; .section-item { border: none; - padding: $activity-item-padding; + padding: $activity-item-padding $activity-item-padding 0; } .icons-collapse-expand:has(+ h4) { height: map-get($iconsizes, 4); @@ -843,6 +843,13 @@ $divider-hover-color: $primary !default; } } + .course-content-item-content > [data-for="sectioninfo"] { + margin: map-get($spacers, 1) 0; + } + .course-content-item-content > [data-for="sectioninfo"]:not(.description) { + margin: 0; + min-height: 0; + } // No bottom line for the last subsection. &:last-child .section-item { .course-content-item-content, diff --git a/public/theme/boost/style/moodle.css b/public/theme/boost/style/moodle.css index ce34abb4c40..5784492e29c 100644 --- a/public/theme/boost/style/moodle.css +++ b/public/theme/boost/style/moodle.css @@ -31126,7 +31126,7 @@ body:not(.editing) .single-section > ul > .course-section .section-item .activit } .activity.subsection .section .section-item { border: none; - padding: 0.75rem; + padding: 0.75rem 0.75rem 0; } .activity.subsection .section .icons-collapse-expand:has(+ h4, + .h4) { height: 24px; @@ -31163,6 +31163,13 @@ body:not(.editing) .activity.subsection .section-item:has([data-for=sectiontoggl body:not(.editing) .activity.subsection .section-item .section .activity:last-child { border-bottom: none; } +body:not(.editing) .activity.subsection .course-content-item-content > [data-for=sectioninfo] { + margin: 0.25rem 0; +} +body:not(.editing) .activity.subsection .course-content-item-content > [data-for=sectioninfo]:not(.description) { + margin: 0; + min-height: 0; +} body:not(.editing) .activity.subsection:last-child .section-item .course-content-item-content, body:not(.editing) .activity.subsection:last-child .section-item:has([data-for=sectiontoggler].collapsed):not(:has(.course-content-item-content.collapsing)) .course-section-header { border-bottom: none; } @@ -47891,4 +47898,4 @@ body { --bs-btn-disabled-bg: transparent; --bs-btn-disabled-border-color: #a6670e; --bs-gradient: none; -} +} \ No newline at end of file diff --git a/public/theme/classic/style/moodle.css b/public/theme/classic/style/moodle.css index d6430bccaf4..e8f9922572a 100644 --- a/public/theme/classic/style/moodle.css +++ b/public/theme/classic/style/moodle.css @@ -31126,7 +31126,7 @@ body:not(.editing) .single-section > ul > .course-section .section-item .activit } .activity.subsection .section .section-item { border: none; - padding: 0.75rem; + padding: 0.75rem 0.75rem 0; } .activity.subsection .section .icons-collapse-expand:has(+ h4, + .h4) { height: 24px; @@ -31163,6 +31163,13 @@ body:not(.editing) .activity.subsection .section-item:has([data-for=sectiontoggl body:not(.editing) .activity.subsection .section-item .section .activity:last-child { border-bottom: none; } +body:not(.editing) .activity.subsection .course-content-item-content > [data-for=sectioninfo] { + margin: 0.25rem 0; +} +body:not(.editing) .activity.subsection .course-content-item-content > [data-for=sectioninfo]:not(.description) { + margin: 0; + min-height: 0; +} body:not(.editing) .activity.subsection:last-child .section-item .course-content-item-content, body:not(.editing) .activity.subsection:last-child .section-item:has([data-for=sectiontoggler].collapsed):not(:has(.course-content-item-content.collapsing)) .course-section-header { border-bottom: none; } @@ -48143,4 +48150,4 @@ body { body.hasstickyfooter #page-footer { padding-bottom: calc(1rem * .5 + max(80px, 1rem * 3)); -} +} \ No newline at end of file