-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nav-styles#71; styles organization 1
- Loading branch information
1 parent
45afce9
commit 4faa687
Showing
12 changed files
with
97 additions
and
37 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import {createGlobalStyle} from 'styled-components' | ||
|
||
const GlobalStyle = createGlobalStyle` | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
font-family: Arial, Helvetica, sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
a:link, a:visited { | ||
text-decoration: none; | ||
list-style: none; | ||
color: inherit; | ||
} | ||
`; | ||
|
||
export default GlobalStyle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import styled from 'styled-components' | ||
|
||
export const Button = styled.button` | ||
padding: 5px 20px; | ||
border-radius: 4px; | ||
color: white; | ||
font-size: 2rem; | ||
border: none; | ||
background: indigo; | ||
`; | ||
|
||
export const CancelButton = styled(Button)` | ||
background: tomato; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import styled from 'styled-components' | ||
import {above} from '../utils' | ||
|
||
export const Heading = styled.h1` | ||
font-size: 2rem; | ||
${above.small` | ||
color:blue | ||
`} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './Headings' | ||
export * from './Buttons' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import {css} from 'styled-components' | ||
|
||
const sizes = { | ||
small: 400, | ||
med: 960, | ||
large: 1140 | ||
} | ||
|
||
export const above = Object.keys(sizes).reduce((acc, label) => { | ||
acc[label] = (...args) => css` | ||
@media (max-width: ${sizes[label] / 16}em) { | ||
${css(...args)} | ||
} | ||
` | ||
return acc | ||
}, {}) | ||
|
||
export const below = Object.keys(sizes).reduce((acc, label) => { | ||
acc[label] = (...args) => css` | ||
@media (max-width: ${sizes[label] / 16}em) { | ||
${css(...args)} | ||
} | ||
` | ||
return acc | ||
}, {}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './Breakpoints' |