Commit fa1b8d7
committed
Add option to stretch the body to the full height
Using CSS flexboxes, we can stretch the document body to the full
height. For doing so, we will need to use a flexbox layout from some
element of which we know the desired minimal height up to the element in
the DOM tree which should stretch.
We achieve the stretching by defining the minimum height of the body to
be 100 viewport height units and adding the `flex-pass` class to all
elements in between. The `flex-pass` class sets the display method of
the element to be a flexbox to allow stretching of the children, and
sets its own grow and shrink to 1.
To counter some rounding error encountered in Gecko and derived
(firefox) browsers, we subtract 1 pixel from the full viewport height to
prevent a minimal 1 pixel scrollbar.1 parent b922acf commit fa1b8d7
2 files changed
+22
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
32 | 50 | | |
33 | 51 | | |
34 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
0 commit comments