Skip to content

Commit

Permalink
chore: use grid-column-gap instead of padding to add gap between layo…
Browse files Browse the repository at this point in the history
…ut elements
  • Loading branch information
jerelmiller committed Jul 29, 2020
1 parent 209cbee commit 5ce869d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
11 changes: 1 addition & 10 deletions src/components/RelatedContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,17 @@ const RelatedContent = ({ className }) => {
siteMetadata {
repository
}
layout {
contentPadding
}
}
}
`);
const { fileRelativePath } = useContext(PageContext);

const {
layout,
siteMetadata: { repository },
} = site;

return (
<aside
className={className}
css={css`
padding: 0 ${layout.contentPadding};
`}
>
<aside className={className}>
<h4>Contribute</h4>
<Button
as={ExternalLink}
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/MainLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ const MainLayout = ({ children }) => {
'sidebar content related-content'
'sidebar footer footer';
grid-template-columns: var(--sidebar-width) minmax(0, 1fr) 340px;
grid-column-gap: ${layout.contentPadding};
width: 100%;
max-width: ${layout.maxWidth};
margin: 0 auto;
Expand Down Expand Up @@ -122,7 +123,7 @@ const MainLayout = ({ children }) => {
<article
css={css`
grid-area: content;
padding: ${layout.contentPadding};
padding: ${layout.contentPadding} 0;
`}
>
{children}
Expand All @@ -140,7 +141,6 @@ const MainLayout = ({ children }) => {
grid-area: footer;
border-top: 1px solid var(--divider-color);
padding: ${layout.contentPadding} 0;
margin-left: ${layout.contentPadding};
`}
/>
</div>
Expand Down

0 comments on commit 5ce869d

Please sign in to comment.