From 0102485180c41428cb9bf3c647bcb1bc0e3b7637 Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Fri, 30 Apr 2021 14:14:59 +0800 Subject: [PATCH] MDL-71454 theme: fix paddings for label resource --- theme/boost/scss/moodle/course.scss | 14 +++++++++++++- theme/boost/scss/moodle/undo.scss | 2 +- theme/boost/style/moodle.css | 12 ++++++++---- theme/classic/style/moodle.css | 12 ++++++++---- 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/theme/boost/scss/moodle/course.scss b/theme/boost/scss/moodle/course.scss index c0fe3754188..ad35a0da539 100644 --- a/theme/boost/scss/moodle/course.scss +++ b/theme/boost/scss/moodle/course.scss @@ -201,7 +201,19 @@ body:not(.editing) .sitetopic ul.section { .section .activity.modtype_label.label { font-weight: normal; - padding: .2em; + + // Remove min-height for labels so top and bottom paddings can be displayed more consistently. + .contentwithoutlink { + min-height: 0; + } + + // When activity information is shown remove the bottom margin for the last p/i elements. + &.hasinfo { + p:last-child, + i:last-child { + margin-bottom: 0; + } + } } .section li.activity { diff --git a/theme/boost/scss/moodle/undo.scss b/theme/boost/scss/moodle/undo.scss index 0d2408fbf1a..bd2f52444ba 100644 --- a/theme/boost/scss/moodle/undo.scss +++ b/theme/boost/scss/moodle/undo.scss @@ -13,7 +13,6 @@ li.activity.label, color: inherit; border: inherit; text-shadow: none; - padding: 8px; white-space: normal; display: block; font-size: inherit; @@ -24,6 +23,7 @@ li.activity.label, .file-picker td.label { display: table-cell; text-align: right; + padding: 8px; } // Some of this dialog is sized in ems so a different font size diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 1260108ebb7..de6bd17fd75 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -13392,8 +13392,12 @@ body:not(.editing) .sitetopic ul.section { display: inline-block; } .section .activity.modtype_label.label { - font-weight: normal; - padding: .2em; } + font-weight: normal; } + .section .activity.modtype_label.label .contentwithoutlink { + min-height: 0; } + .section .activity.modtype_label.label.hasinfo p:last-child, + .section .activity.modtype_label.label.hasinfo i:last-child { + margin-bottom: 0; } .section li.activity { padding: 0.2em; @@ -18590,7 +18594,6 @@ li.activity.label, color: inherit; border: inherit; text-shadow: none; - padding: 8px; white-space: normal; display: block; font-size: inherit; @@ -18599,7 +18602,8 @@ li.activity.label, .file-picker td.label { display: table-cell; - text-align: right; } + text-align: right; + padding: 8px; } .choosercontainer #chooseform .option label { font-size: 12px; } diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index 82ebe6ae5e8..3af00044b07 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -13614,8 +13614,12 @@ body:not(.editing) .sitetopic ul.section { display: inline-block; } .section .activity.modtype_label.label { - font-weight: normal; - padding: .2em; } + font-weight: normal; } + .section .activity.modtype_label.label .contentwithoutlink { + min-height: 0; } + .section .activity.modtype_label.label.hasinfo p:last-child, + .section .activity.modtype_label.label.hasinfo i:last-child { + margin-bottom: 0; } .section li.activity { padding: 0.2em; @@ -18833,7 +18837,6 @@ li.activity.label, color: inherit; border: inherit; text-shadow: none; - padding: 8px; white-space: normal; display: block; font-size: inherit; @@ -18842,7 +18845,8 @@ li.activity.label, .file-picker td.label { display: table-cell; - text-align: right; } + text-align: right; + padding: 8px; } .choosercontainer #chooseform .option label { font-size: 12px; }