Why does Boost core.scss have #region-main min-height: 45 rem

Why does Boost core.scss have #region-main min-height: 45 rem

by Chris Kenniburg -
Number of replies: 5
Picture of Particularly helpful Moodlers Picture of Plugin developers

Is there a reason we have a min-height set so high?  On my theme I am planning to set this to something much shorter but want to know if there is a reason for such a large min-height.


/boost/scss/moodle/core.scss

#region-main > .card {

    overflow-x: auto;

    overflow-y: visible;

    min-height: 45rem;

}


On pages with not a lot of content this makes you scroll past empty white space.

Average of ratings: -
In reply to Chris Kenniburg

Re: Why does Boost core.scss have #region-main min-height: 45 rem

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Try removing that SCSS and see what happens in My dashboard page when you remove the Course Overview block and any other blocks if they exist?

In reply to Mary Evans

Re: Why does Boost core.scss have #region-main min-height: 45 rem

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers

I set it to min-height:2rem; and it does what i'd expect.  However, this is a setting that is part of core Boost.  

I am wondering if it is just a typo or something that was dropped into the SCSS file while testing.  

This minimum height of 45rem on the surface would appear to want to force a minimum amount of scrolling a user might need to do. 

In reply to Chris Kenniburg

Re: Why does Boost core.scss have #region-main min-height: 45 rem

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Well since Boost/scss/bootstrap/_variable.scss states...

// Pixel value used to responsively scale all typography. Applied to the `<html>` element.
$font-size-root: 16px !default;

Then 45rem = 720px which is a good page size for the average screen resolution of 1024px x 768px.

Which makes me think that this min-height is more to do with keeping the footer in place...but I have not tested it.

Cheers

Mary

Average of ratings: Useful (1)
In reply to Chris Kenniburg

Re: Why does Boost core.scss have #region-main min-height: 45 rem

by Damyon Wiese -

It is a workaround because the Bootstrap menus are kept in the DOM next to the trigger that opens them. This means that when they are in a scrollable region - they will not float over the region, but instead will make scrollbars in the page when the menu is long. This size was chosen as a reasonable minimum amount of space to reserve to avoid this problem. Hopefully bootstrap will fix their menus in the stable release (I'm not hopeful though). 



Average of ratings: Useful (2)
In reply to Damyon Wiese

Re: Why does Boost core.scss have #region-main min-height: 45 rem

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Thank you.  Glad I asked.  That makes sense.