MDL-64821 theme_classic: disable some boost general page styling

Disable the reset and fixed width content styling from the Boost
theme for the classic theme because it doesn't work well with
blocks.
This commit is contained in:
Ryan Wyllie 2019-09-18 09:32:50 +08:00
parent 23e0ceca16
commit a5f88ccca2
3 changed files with 55 additions and 88 deletions

View File

@ -192,63 +192,67 @@ body:not(.jsenabled) .langmenu:hover > .dropdown-menu,
* - Make the content region flex grow so it pushes things like the
* next activity selector to the bottom of the page.
*/
body.reset-style {
#page-header {
.card {
border: none;
$allow-reset-style: true !default;
.page-header-headings {
h1 {
margin-bottom: 0;
}
}
}
& > div {
padding-top: 0 !important; /* stylelint-disable-line declaration-no-important */
padding-bottom: 0 !important; /* stylelint-disable-line declaration-no-important */
}
}
#page-content {
padding-bottom: 0 !important; /* stylelint-disable-line declaration-no-important */
#region-main-box {
display: flex;
#region-main {
@if $allow-reset-style {
body.reset-style {
#page-header {
.card {
border: none;
display: flex;
flex-direction: column;
padding: 0;
height: 100%;
width: 100%;
padding-left: $card-spacer-x;
padding-right: $card-spacer-x;
div[role="main"] {
flex: 1;
}
.activity-navigation {
overflow: hidden;
}
&.has-blocks {
width: calc(100% - #{$blocks-plus-gutter});
@include media-breakpoint-down(lg) {
width: 100%;
.page-header-headings {
h1 {
margin-bottom: 0;
}
}
}
[data-region="blocks-column"] {
margin-left: auto;
& > div {
padding-top: 0 !important; /* stylelint-disable-line declaration-no-important */
padding-bottom: 0 !important; /* stylelint-disable-line declaration-no-important */
}
}
@include media-breakpoint-down(lg) {
flex-direction: column;
#page-content {
padding-bottom: 0 !important; /* stylelint-disable-line declaration-no-important */
#region-main-box {
display: flex;
#region-main {
border: none;
display: flex;
flex-direction: column;
padding: 0;
height: 100%;
width: 100%;
padding-left: $card-spacer-x;
padding-right: $card-spacer-x;
div[role="main"] {
flex: 1;
}
.activity-navigation {
overflow: hidden;
}
&.has-blocks {
width: calc(100% - #{$blocks-plus-gutter});
@include media-breakpoint-down(lg) {
width: 100%;
}
}
}
[data-region="blocks-column"] {
margin-left: auto;
}
@include media-breakpoint-down(lg) {
flex-direction: column;
}
}
}
}

View File

@ -1 +1,4 @@
// General variables for all presets
// Disable the Boost theme reset styling and fixed width content.
$allow-reset-style: false;

View File

@ -17619,46 +17619,6 @@ body:not(.jsenabled) .langmenu:hover > .dropdown-menu,
* - Make the content region flex grow so it pushes things like the
* next activity selector to the bottom of the page.
*/
body.reset-style #page-header .card, body.reset-style #page-header #page-enrol-users #filterform, #page-enrol-users body.reset-style #page-header #filterform, body.reset-style #page-header .que .history, .que body.reset-style #page-header .history, body.reset-style #page-header .userprofile .profile_tree section, .userprofile .profile_tree body.reset-style #page-header section, body.reset-style #page-header .groupinfobox, body.reset-style #page-header .well {
border: none; }
body.reset-style #page-header .card .page-header-headings h1, body.reset-style #page-header #page-enrol-users #filterform .page-header-headings h1, #page-enrol-users body.reset-style #page-header #filterform .page-header-headings h1, body.reset-style #page-header .que .history .page-header-headings h1, .que body.reset-style #page-header .history .page-header-headings h1, body.reset-style #page-header .userprofile .profile_tree section .page-header-headings h1, .userprofile .profile_tree body.reset-style #page-header section .page-header-headings h1, body.reset-style #page-header .groupinfobox .page-header-headings h1, body.reset-style #page-header .well .page-header-headings h1 {
margin-bottom: 0; }
body.reset-style #page-header > div {
padding-top: 0 !important;
/* stylelint-disable-line declaration-no-important */
padding-bottom: 0 !important;
/* stylelint-disable-line declaration-no-important */ }
body.reset-style #page-content {
padding-bottom: 0 !important;
/* stylelint-disable-line declaration-no-important */ }
body.reset-style #page-content #region-main-box {
display: flex; }
body.reset-style #page-content #region-main-box #region-main {
border: none;
display: flex;
flex-direction: column;
padding: 0;
height: 100%;
width: 100%;
padding-left: 1.25rem;
padding-right: 1.25rem; }
body.reset-style #page-content #region-main-box #region-main div[role="main"] {
flex: 1; }
body.reset-style #page-content #region-main-box #region-main .activity-navigation {
overflow: hidden; }
body.reset-style #page-content #region-main-box #region-main.has-blocks {
width: calc(100% - 375px); }
@media (max-width: 1199.98px) {
body.reset-style #page-content #region-main-box #region-main.has-blocks {
width: 100%; } }
body.reset-style #page-content #region-main-box [data-region="blocks-column"] {
margin-left: auto; }
@media (max-width: 1199.98px) {
body.reset-style #page-content #region-main-box {
flex-direction: column; } }
body.behat-site .fixed-top {
position: absolute; }