Skip to content

Commit 9bbf845

Browse files
committed
Fill the viewport block in all browsers (opinionated)
1 parent 9753764 commit 9bbf845

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

evergreen.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,15 @@
4747
* ========================================================================== */
4848

4949
/**
50-
* Remove the margin in all browsers (opinionated).
50+
* 1. Fill the viewport block in all browsers (opinionated).
51+
* 2. Remove the margin in all browsers (opinionated).
5152
*/
5253

5354
:where(body) {
54-
margin: 0;
55+
block-size: -moz-available; /* 1 */
56+
block-size: -webkit-fill-available; /* 1 */
57+
block-size: stretch; /* 1 */
58+
margin: 0; /* 2 */
5559
}
5660

5761
/**

sanitize.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,15 @@
4747
* ========================================================================== */
4848

4949
/**
50-
* Remove the margin in all browsers (opinionated).
50+
* 1. Fill the viewport block in all browsers (opinionated).
51+
* 2. Remove the margin in all browsers (opinionated).
5152
*/
5253

5354
:where(body) {
54-
margin: 0;
55+
block-size: -moz-available; /* 1 */
56+
block-size: -webkit-fill-available; /* 1 */
57+
block-size: stretch; /* 1 */
58+
margin: 0; /* 2 */
5559
}
5660

5761
/**

0 commit comments

Comments
 (0)