File tree 4 files changed +14
-2
lines changed
4 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 5
5
This is their landing page, it's made with the [ Gatsby] ( https://www.gatsbyjs.org/ ) framework!.
6
6
7
7
[ ![ code style: prettier] ( https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square )] ( https://github.com/prettier/prettier )
8
+ [ ![ Maintainability] ( https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/maintainability )] ( https://codeclimate.com/github/codeclimate/codeclimate/maintainability )
Original file line number Diff line number Diff line change
1
+ exports . onClientEntry = ( ) => {
2
+ // The value in the --wh custom property set to the root of the document
3
+ document . documentElement . style . setProperty ( "--wh" , `${ window . innerHeight } px` ) ;
4
+ window . addEventListener ( "resize" , ( ) => {
5
+ document . documentElement . style . setProperty (
6
+ "--wh" ,
7
+ `${ window . innerHeight } px`
8
+ ) ;
9
+ } ) ;
10
+ } ;
Original file line number Diff line number Diff line change 3
3
}
4
4
body {
5
5
margin : 0 ;
6
- background : lavender;
7
6
}
8
7
9
8
footer {
Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ const Layout = ({ children }) => (
12
12
) ;
13
13
14
14
const Page = styled . div `
15
- min-height: 100vh;
15
+ background: lavender;
16
+ min-height: 100vh; /* Fallback for browsers that do not support Custom Properties */
17
+ min-height: var(--wh, 100vh);
16
18
display: flex;
17
19
flex-direction: column;
18
20
align-items: center;
You can’t perform that action at this time.
0 commit comments