bootstrap utilizes various breakpoints to minimize complications.
utilizing calc involves two rendering loops, making it less suitable for core page styles like the layout of a page.
combining media queries and percentages can help achieve the desired functionality.
assign a %
to the height to allow for resizing with the screen, and specify a max-height
property at each screen breakpoint as an alternative approach to modifications.
personally, I prefer using breakpoints. In creating a flex layout mini-library, I found the following layout architecture to be the most effective:
/**
* ||||||||∞ layout-lg-direction
* ||||||||||||||||||||||∞ layout-md-direction
* |||||||||||||||||||||||||||||∞ layout-sm-direction
* ||||||||||||||||||||||||||||||||||||||||∞ layout-xs-direction
* ||||||||||||||||||||||||||||||||||||||||||||||||||∞ layout-direction
* |---------|----------|----------|---------|--------
* 0px 480px 768px 940px 1200px ∞px
*
*///direction: row, column
this approach differs from bootstrap by not starting with mobile-first coding, but it is more optimized for mobile devices as it requires fewer media queries for mobile.
Edit
on a side note, you may also consider using @if $i % $breakpoint == 0
or a similar method in your breakpoints along with a percentage height to achieve the same effect.