Skip to content

Commit 5d8dd54

Browse files
committed
fix mobile flex 100vh layouts
1 parent c2ff50d commit 5d8dd54

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

explorer/components/DayPage.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,22 @@ const Container = styled.main.attrs({ className: 'Explorer__DrawingPage__Contain
6161
`
6262

6363
const DayHeading = styled.h1.attrs({ className: 'Explorer__DayPage__DayHeading'})`
64+
flex: 0 0 auto;
6465
font-size: 32px;
6566
padding: 12px 16px;
6667
text-align: center;
6768
`
6869

6970
const DrawingSection = styled.section.attrs({ className: 'Explorer__DayPage__DrawingSection'})`
71+
flex: 1 1 0;
7072
overflow: scroll;
7173
text-align: center;
7274
`
7375

7476
const NavBar = styled.nav.attrs({ className: 'Explorer__DrawingPage__Header'})`
7577
color: #BBB;
7678
display: flex;
79+
flex: 0 0 auto;
7780
justify-content: space-between;
7881
font-size: 18px;
7982
font-weight: bold;

explorer/components/DrawingPage.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,15 @@ const Container = styled.main.attrs({ className: 'Explorer__DrawingPage__Contain
6262
`
6363

6464
const Title = styled.h1.attrs({ className: 'Explorer__DrawingPage__Title'})`
65+
flex: 0 0 auto;
6566
font-size: 32px;
6667
font-weight: bold;
6768
padding: 16px 24px;
6869
text-align: center;
6970
`
7071

7172
const ImageWrap = styled.figure.attrs({ className: 'Explorer__DrawingPage__ImageWrap'})`
72-
flex-grow: 1;
73+
flex: 1 1 0;
7374
position: relative;
7475
`
7576

@@ -84,6 +85,7 @@ const Image = styled.img.attrs({ className: 'Explorer__DrawingPage__Image'})`
8485
const NavBar = styled.nav.attrs({ className: 'Explorer__DrawingPage__Header'})`
8586
color: #BBB;
8687
display: flex;
88+
flex: 0 0 auto;
8789
justify-content: space-between;
8890
font-size: 18px;
8991
font-weight: bold;

0 commit comments

Comments
 (0)