From 88b8f0ef2069f778479e8df6c98ee10c4cf4afed Mon Sep 17 00:00:00 2001 From: Ferran Recio Date: Wed, 29 Dec 2021 12:24:47 +0100 Subject: [PATCH] MDL-73530 theme_boost: fix course edit dropzones --- theme/boost/scss/moodle/core.scss | 11 +++++--- theme/boost/scss/moodle/course.scss | 20 +++++++++++--- theme/boost/scss/moodle/courseindex.scss | 2 +- theme/boost/style/moodle.css | 33 +++++++++++++++++------- theme/classic/style/moodle.css | 33 +++++++++++++++++------- 5 files changed, 71 insertions(+), 28 deletions(-) diff --git a/theme/boost/scss/moodle/core.scss b/theme/boost/scss/moodle/core.scss index 708fabfbd52..08f5d869764 100644 --- a/theme/boost/scss/moodle/core.scss +++ b/theme/boost/scss/moodle/core.scss @@ -200,7 +200,6 @@ button.close, .inline-list li, .block .list, .block .list li, -.section li.activity, .section li.movehere, .tabtree li { list-style: none; @@ -2851,15 +2850,19 @@ $scrollbar-track: lighten($primary, 40%); body.dragging { .drop-zone { - border: 2px dashed $dropzone-border; + border: 1px dashed $dropzone-border; } .drop-up { - border-top: 2px solid $dropzone-border; + border-top: 1px solid $dropzone-border; + border-top-left-radius: 0; + border-top-right-radius: 0; } .drop-down { - border-bottom: 2px solid $dropzone-border; + border-bottom: 1px solid $dropzone-border; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; } .dragging { diff --git a/theme/boost/scss/moodle/course.scss b/theme/boost/scss/moodle/course.scss index f7c7ddaa131..fa0146a9843 100644 --- a/theme/boost/scss/moodle/course.scss +++ b/theme/boost/scss/moodle/course.scss @@ -9,6 +9,7 @@ .section-modchooser { clear: both; + margin-top: map-get($spacers, 1); } .block_tree .tree_item.branch { @@ -69,6 +70,9 @@ body:not(.editing) .sitetopic ul.section { } .activity { + list-style: none; + padding: map-get($spacers, 1) 0; + .spinner { left: 100%; position: absolute; @@ -287,14 +291,25 @@ body:not(.editing) .sitetopic ul.section { } } +// Compensate for the border widths when dropzones are displayed. .course-content .section.dropready { &.main.drop-down { - border-bottom: 2px solid $dropzone-border; + border-bottom: 1px solid $dropzone-border; + } + + .course-section-header.dropready.drop-zone { + margin-top: -2px; } li.activity.dropready.drop-down { - border-bottom: 2px solid $dropzone-border; + border-bottom: 1px solid $dropzone-border; + margin-bottom: -1px; + } + + li.activity.dropready.drop-up { + border-top: 1px solid $dropzone-border; + margin-top: -1px; } } @@ -1369,7 +1384,6 @@ $activity-add-hover: theme-color-level('primary', -10) !default; .activity-item { position: relative; - margin: map-get($spacers, 2) 0; @if $enable-rounded { @include border-radius(); diff --git a/theme/boost/scss/moodle/courseindex.scss b/theme/boost/scss/moodle/courseindex.scss index cc14a47a338..d652d685f62 100644 --- a/theme/boost/scss/moodle/courseindex.scss +++ b/theme/boost/scss/moodle/courseindex.scss @@ -34,7 +34,7 @@ $courseindex-item-current: $primary !default; @mixin courseindex-item-dragging() { &.dragging { - border: $border-width $courseindex-item-dragging-border; + border: $border-width solid $courseindex-item-dragging-border; background-color: $courseindex-item-dragging-bg; } } diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 53f97b95ce2..3280ef285b9 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -10047,7 +10047,6 @@ button.close:focus:hover, .inline-list li, .block .list, .block .list li, -.section li.activity, .section li.movehere, .tabtree li { list-style: none; @@ -12172,13 +12171,17 @@ input[disabled] { border-right: 1px solid #fff; } body.dragging .drop-zone { - border: 2px dashed #1d2125; } + border: 1px dashed #1d2125; } body.dragging .drop-up { - border-top: 2px solid #1d2125; } + border-top: 1px solid #1d2125; + border-top-left-radius: 0; + border-top-right-radius: 0; } body.dragging .drop-down { - border-bottom: 2px solid #1d2125; } + border-bottom: 1px solid #1d2125; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; } body.dragging .dragging { opacity: .6; } @@ -13704,7 +13707,8 @@ table.calendartable caption { clear: both; } .section-modchooser { - clear: both; } + clear: both; + margin-top: 0.25rem; } .block_tree .tree_item.branch { margin-left: 8px; } @@ -13751,6 +13755,8 @@ body:not(.editing) .sitetopic ul.section { width: 16px; } .section .activity { + list-style: none; + padding: 0.25rem 0; /* The command block for each activity */ } .section .activity .spinner { left: 100%; @@ -13900,10 +13906,18 @@ body:not(.editing) .sitetopic ul.section { padding-bottom: 0; } .course-content .section.dropready.main.drop-down { - border-bottom: 2px solid #1d2125; } + border-bottom: 1px solid #1d2125; } + +.course-content .section.dropready .course-section-header.dropready.drop-zone { + margin-top: -2px; } .course-content .section.dropready li.activity.dropready.drop-down { - border-bottom: 2px solid #1d2125; } + border-bottom: 1px solid #1d2125; + margin-bottom: -1px; } + +.course-content .section.dropready li.activity.dropready.drop-up { + border-top: 1px solid #1d2125; + margin-top: -1px; } .section .activity .activityinstance .groupinglabel { padding-left: 30px; } @@ -14700,7 +14714,6 @@ span.editinstructions { .activity-item { position: relative; - margin: 0.5rem 0; border-radius: 0.5rem; } .activity-item:not(.activityinline) { border: 1px solid #dee2e6; @@ -21248,7 +21261,7 @@ div.editor_atto_toolbar button .icon { .courseindex .courseindex-item:hover.draggable, .courseindex .courseindex-item:focus.draggable { cursor: pointer; } .courseindex .courseindex-item.dragging { - border: 1px #b8dce2; + border: 1px solid #b8dce2; background-color: #e0f0f2; } .courseindex .courseindex-item.active { background-color: #f8f9fa; @@ -21276,7 +21289,7 @@ div.editor_atto_toolbar button .icon { .courseindex .courseindex-section { border-left: solid 3px transparent; } .courseindex .courseindex-section.dragging { - border: 1px #b8dce2; + border: 1px solid #b8dce2; background-color: #e0f0f2; } .courseindex .courseindex-section .current-badge { line-height: 1.5; diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index 0c1fea70601..4eff53c35c9 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -10047,7 +10047,6 @@ button.close:focus:hover, .inline-list li, .block .list, .block .list li, -.section li.activity, .section li.movehere, .tabtree li { list-style: none; @@ -12172,13 +12171,17 @@ input[disabled] { border-right: 1px solid #fff; } body.dragging .drop-zone { - border: 2px dashed #1d2125; } + border: 1px dashed #1d2125; } body.dragging .drop-up { - border-top: 2px solid #1d2125; } + border-top: 1px solid #1d2125; + border-top-left-radius: 0; + border-top-right-radius: 0; } body.dragging .drop-down { - border-bottom: 2px solid #1d2125; } + border-bottom: 1px solid #1d2125; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; } body.dragging .dragging { opacity: .6; } @@ -13704,7 +13707,8 @@ table.calendartable caption { clear: both; } .section-modchooser { - clear: both; } + clear: both; + margin-top: 0.25rem; } .block_tree .tree_item.branch { margin-left: 8px; } @@ -13751,6 +13755,8 @@ body:not(.editing) .sitetopic ul.section { width: 16px; } .section .activity { + list-style: none; + padding: 0.25rem 0; /* The command block for each activity */ } .section .activity .spinner { left: 100%; @@ -13900,10 +13906,18 @@ body:not(.editing) .sitetopic ul.section { padding-bottom: 0; } .course-content .section.dropready.main.drop-down { - border-bottom: 2px solid #1d2125; } + border-bottom: 1px solid #1d2125; } + +.course-content .section.dropready .course-section-header.dropready.drop-zone { + margin-top: -2px; } .course-content .section.dropready li.activity.dropready.drop-down { - border-bottom: 2px solid #1d2125; } + border-bottom: 1px solid #1d2125; + margin-bottom: -1px; } + +.course-content .section.dropready li.activity.dropready.drop-up { + border-top: 1px solid #1d2125; + margin-top: -1px; } .section .activity .activityinstance .groupinglabel { padding-left: 30px; } @@ -14700,7 +14714,6 @@ span.editinstructions { .activity-item { position: relative; - margin: 0.5rem 0; border-radius: 0.25rem; } .activity-item:not(.activityinline) { border: 1px solid #dee2e6; @@ -21194,7 +21207,7 @@ div.editor_atto_toolbar button .icon { .courseindex .courseindex-item:hover.draggable, .courseindex .courseindex-item:focus.draggable { cursor: pointer; } .courseindex .courseindex-item.dragging { - border: 1px #b8dce2; + border: 1px solid #b8dce2; background-color: #e0f0f2; } .courseindex .courseindex-item.active { background-color: #f8f9fa; @@ -21222,7 +21235,7 @@ div.editor_atto_toolbar button .icon { .courseindex .courseindex-section { border-left: solid 3px transparent; } .courseindex .courseindex-section.dragging { - border: 1px #b8dce2; + border: 1px solid #b8dce2; background-color: #e0f0f2; } .courseindex .courseindex-section .current-badge { line-height: 1.5;