Skip to content

Commit

Permalink
Layout: Replace the calc height with flex-grow
Browse files Browse the repository at this point in the history
  • Loading branch information
ChengYanJin committed Jan 20, 2022
1 parent 89a79f1 commit 6e4cf0a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/components/layout/Layout.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import React from 'react';
import styled from 'styled-components';
import type { Node } from 'react';
import { navbarHeight } from '../../style/theme';
import Navbar from '../navbar/Navbar.component';
import type { Props as NavbarProps } from '../navbar/Navbar.component';
import type { Props as SidebarProps } from '../sidebar/Sidebar.component';
Expand All @@ -18,13 +17,13 @@ type Props = {
const LayoutContainer = styled.div`
display: flex;
flex-direction: column;
height: 100%;
`;

const ContentContainer = styled.div`
display: flex;
flex-direction: row;
// there is a 1px border between the navbar and the content
height: calc(100vh - ${navbarHeight} - 1px);
flex-grow: 1;
`;

const MainContent = styled.div`
Expand Down

0 comments on commit 6e4cf0a

Please sign in to comment.