Skip to content

Commit a90811c

Browse files
committed
Add bugfix snippet for MDL-85944
1 parent 483a5e8 commit a90811c

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Snippet Title: Course overview block on Dashboard with proper borders
3+
* Scope: global
4+
* Goal: bugfix
5+
* Description: If you place the 'Course overview' block on the Dashboard, you will see that it is not presented equally to other blocks on the Dashboard. It lacks borders and it has a surplus line below the heading. This snippet fixes this glitch and presents the course overview block similar to the other Dashboard blocks.
6+
* Creator: Alexander Bias
7+
* Tracker issue: MDL-85944
8+
* Tested on: Moodle 5.0, Firefox for Mac
9+
*
10+
* @copyright 2025 Alexander Bias, ssystems GmbH
11+
* @author Alexander Bias <abias@ssystems.de>
12+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
13+
*/
14+
15+
#page-my-index .block_myoverview {
16+
/* On the Dashboard, Moodle core removes the block's border with:
17+
.drawers .block_myoverview { border: 0; }
18+
We cannot revert that with CSS, but we can re-set the original value. */
19+
border: var(--bs-card-border-width) solid var(--bs-card-border-color);
20+
21+
.card-body {
22+
/* On the Dashboard, Moodle core removes the block's padding with:
23+
.drawers .block_myoverview > .card-body { padding-top: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
24+
We cannot revert that with CSS, but we can re-set the original value. */
25+
padding: 1rem !important;
26+
}
27+
28+
.card-text > .block-myoverview > hr {
29+
/* The block comes with a hardcoded hr element which is added below the heading.
30+
On the dashboard, this looks odd. We just remove it there with CSS. */
31+
display: none;
32+
}
33+
}
37.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)