Skip to content

Commit

Permalink
remove calc() from styles
Browse files Browse the repository at this point in the history
Fixes #20
  • Loading branch information
tgolen committed Aug 9, 2020
1 parent 8df561f commit 74d5455
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/page/HomePage/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import Main from './MainView';
const App = () => (
<>
<StatusBar barStyle="dark-content" />
<SafeAreaView>
<View>
<SafeAreaView style={[styles.flex1, styles.h100p]}>
<View style={[styles.flexColumn, styles.h100p]}>
<Header />
<View style={[styles.flexRow, styles.mainContentWrapper]}>
<View style={[styles.flex1, styles.flexRow]}>
<Sidebar />
<Main />
</View>
Expand Down
9 changes: 6 additions & 3 deletions src/style/StyleSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ const styles = StyleSheet.create({
p1: {
padding: 10,
},
h100p: {
height: '100%',
},
flex1: {
flex: 1,
},
flexRow: {
flexDirection: 'row',
},
flexColumn: {
flexDirection: 'column',
},
flexGrow1: {
flexGrow: 1,
},
Expand All @@ -31,9 +37,6 @@ const styles = StyleSheet.create({
navText: {
padding: 8,
},
mainContentWrapper: {
height: 'calc(100vh - 73px)',
},
});

export default styles;
9 changes: 9 additions & 0 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
<html lang="en">
<head>
<title>Chat</title>
<style>
html,
body,
#root,
#root > div,
#root > div > div {
height: 100% !important;
}
</style>
</head>
<body>
<div id="root"></div>
Expand Down

0 comments on commit 74d5455

Please sign in to comment.