Skip to content

Commit 718591c

Browse files
committed
feat(styles): add postcss.config, global styles and theme
1 parent d5786c1 commit 718591c

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

postcss.config.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = ({file, options, env}) => ({
2+
plugins: {
3+
'postcss-import': {},
4+
'postcss-svg': {},
5+
'postcss-cssnext': options.cssnext ? {} : false,
6+
'postcss-url': {
7+
url: 'inline',
8+
// maxSize: 8.192,
9+
ignoreFragmentWarning: true
10+
},
11+
autoprefixer: env === 'production' ? {} : false,
12+
// stylelint: env === 'production'
13+
// ? false
14+
// : {
15+
// extends: ['stylelint-config-standard'],
16+
// rules: {
17+
// indentation: 'tab'
18+
// }
19+
// },
20+
'postcss-browser-reporter': {},
21+
'postcss-reporter': {}
22+
}
23+
})

styles/global.jsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import {injectGlobal} from 'styled-components'
2+
3+
// NOTE: some styles are duplicated to make SSRed app looks better
4+
injectGlobal`
5+
body {
6+
margin: 0;
7+
padding: 0;
8+
overflow-x: hidden;
9+
min-width: 320px;
10+
background: white;
11+
font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
12+
font-size: 14px;
13+
line-height: 1.4285em;
14+
color: rgba(0, 0, 0, 0.87);
15+
}
16+
`

styles/theme.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default {
2+
white: '#FFF',
3+
black: '#000'
4+
}

0 commit comments

Comments
 (0)