Skip to content

Commit

Permalink
chore: ensure the footer stays on the bottom of the page
Browse files Browse the repository at this point in the history
  • Loading branch information
zstix committed May 8, 2020
1 parent 222882d commit 1187160
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/components/Footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
background-color: var(--color-neutrals-800);
color: var(--footer-text-color);
padding: 1.5rem 0;
margin-top: 10rem;

.u-container {
display: flex;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import Header from './Header';
import './styles.scss';

const Layout = ({ children }) => (
<>
<div className="Layout">
<Header />
<main>{children}</main>
<Footer />
</>
</div>
);

Layout.propTypes = {
Expand Down
15 changes: 15 additions & 0 deletions src/components/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,18 @@ button,
font-family: var(--primary-font-family);
cursor: pointer;
}

/*-- Layout Styles --*/
.Layout {
min-height: 100vh;
display: flex;
flex-direction: column;

> main {
flex: 1 0 auto;
}

> footer {
flex-shrink: 0;
}
}

0 comments on commit 1187160

Please sign in to comment.