diff --git a/CHANGES.md b/CHANGES.md index 7aea38fe5df9f9d3caf9d20e44bc3c4f53ae0ddf..518a65bce842235b8b952d4e95be39a27fd59f26 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,10 @@ moodle-theme_boost_campus Changes ------- +### Unreleased + +* 2020-11-17 - Bugfix: Dashboard columns did not collapse correctly when blockcolumnwidthdashboard != blockcolumnwidth. + ### Release v3.9-r1 * 2020-09-30 - Adjusted settings.php due to upstream changes in theme Boost settings. diff --git a/scss/post.scss b/scss/post.scss index c74af7d1b3d398761e579456fbfd3201423308a1..51a41a8a3b8f347c34e2632f1332b358c001209e 100644 --- a/scss/post.scss +++ b/scss/post.scss @@ -19,24 +19,57 @@ display: block; } } - } -} -[data-region="blocks-column"] { - width: $blocks-column-width; - @include media-breakpoint-down(md) { - width: 100%; + [data-region="blocks-column"] { + width: $blocks-column-width; + @include media-breakpoint-down(md) { + width: 100%; + } + } } } -/* Change the block column width if setting 'blockcolumnwidthdashboard' is different from setting 'blockcolumnwidth'. */ +/* Change the block column width on the Dashboard if setting 'blockcolumnwidthdashboard' is different from setting 'blockcolumnwidth'. */ @if variable-exists(blockcolumnwidthdashboard) and variable-exists(blockcolumnwidth) { @if $blockcolumnwidthdashboard != $blockcolumnwidth { - #page-my-index [data-region="blocks-column"] { - width: $blocks-column-width-dashboard; + /* Distinguish again if setting 'breakpoint' is active. + This if-construction has duplicated code by purpose for the sake of readability. */ + @if variable-exists(breakpoint) and $breakpoint == 'yes' { + #page-my-index #region-main-settings-menu.has-blocks, + #page-my-index #region-main.has-blocks { + display: inline-block; + width: calc(100% - #{$blocks-plus-gutter-dashboard}); + @include media-breakpoint-down(md) { + width: 100%; + /* MDL-63102 - Remove extra space at bottom. + If modifying make sure block-region is horizontally stacked when in full screen */ + display: block; + } + } + #page-my-index [data-region="blocks-column"] { + width: $blocks-column-width-dashboard; + @include media-breakpoint-down(md) { + width: 100%; + } + } } - #page-my-index #region-main-settings-menu.has-blocks, - #page-my-index #region-main.has-blocks { - width: calc(100% - #{$blocks-plus-gutter-dashboard}); + @else { + #page-my-index #region-main-settings-menu.has-blocks, + #page-my-index #region-main.has-blocks { + display: inline-block; + width: calc(100% - #{$blocks-plus-gutter-dashboard}); + @include media-breakpoint-down(lg) { + width: 100%; + /* MDL-63102 - Remove extra space at bottom. + If modifying make sure block-region is horizontally stacked when in full screen */ + display: block; + } + } + #page-my-index [data-region="blocks-column"] { + width: $blocks-column-width-dashboard; + @include media-breakpoint-down(lg) { + width: 100%; + } + } } } }