diff options
author | Nick Van Doorn <vandoorn.nick@gmail.com> | 2019-03-20 04:10:17 -0700 |
---|---|---|
committer | Nick Van Doorn <vandoorn.nick@gmail.com> | 2019-03-20 04:10:17 -0700 |
commit | 2afd0e21b416a4915c07b31b2a22e44b6dd84405 (patch) | |
tree | 9956cd841ccd879eb5cd5e05e6615662daab0e33 /src | |
parent | adb80bcd2bb028bda923e1fbf99b4d849132b9da (diff) |
Use media query for nav padding (viewport width)
Diffstat (limited to 'src')
-rw-r--r-- | src/components/nav.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/nav.js b/src/components/nav.js index 5767c64..163bb0c 100644 --- a/src/components/nav.js +++ b/src/components/nav.js @@ -1,7 +1,7 @@ import React from 'react' import { css } from '@emotion/core' import { Link } from 'gatsby' -import { margins } from './globals' +import { margins, breakpoints } from './globals' const navStyle = css` display: flex; @@ -10,7 +10,10 @@ const navStyle = css` export const Nav = p => { const linkStyle = css` - padding: 0 ${margins.md}px ${margins.md}px ${margins.md}px; + padding: 0 ${margins.sm}px ${margins.sm}px ${margins.sm}px; + @media (min-width: ${breakpoints[0].breakpoint}) { + padding: 0 ${margins.md}px ${margins.md}px ${margins.md}px; + } &:not(:last-child) { margin: 0 ${margins.sm}px 0 0; } |