concept height in category css

This is an excerpt from Manning's book CSS in Depth.
vmin—1/100th of the smaller dimension, height or width (IE9 supports vm instead of vmin) vmax—1/100th of the larger dimension, height or width (not supported in IE or, at the time of writing, Edge) For example, 50 vw is equal to half the width of the viewport, and 25 vh equals 25% of the viewport’s height. vmin is based on which of the two (height or width) is smaller. This is helpful for ensuring that an element will fit on the screen regardless of its orientation: If the screen is landscape, it’ll be based on the height; if portrait, it’s based on the width.
Figure 2.10 shows a square element as it appears in several viewports with different screen sizes. It’s defined with both a height and a width of 90 vmin, which equals 90% of the smaller of the two dimensions—90% of the height on landscape screens, or 90% of the width on portrait.
You can set a height explicitly, instead, to something like 120 px, but the problem is you don’t know exactly what the height should be. That’s only known once the contents are set and rendered in the browser, so you’ll have to use JavaScript to determine the height.
Listing 14.11. Setting the height explicitly so the transition works
(function () { var toggle = document.getElementsByClassName('dropdown__toggle')[0]; var dropdown = toggle.parentElement; var drawer = document.getElementsByClassName('dropdown__drawer')[0]; var height = drawer.scrollHeight; 1 toggle.addEventListener('click', function (e) { e.preventDefault(); dropdown.classList.toggle('is-open'); if (dropdown.classList.contains('is-open')) { drawer.style.setProperty('height', height + 'px'); 2 } else { drawer.style.setProperty('height', '0'); 3 } }); }());