Skip to content

Commit f81f509

Browse files
committed
feat(csstips): Add normalization and page setup via csstips
1 parent 3bc8a44 commit f81f509

2 files changed

Lines changed: 11 additions & 24 deletions

File tree

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@
137137
"dependencies": {
138138
"chalk": "^1.1.3",
139139
"compression": "^1.6.2",
140+
"csstips": "0.0.3",
141+
"csx": "^8.2.1",
140142
"es6-promise": "^4.0.5",
141143
"express": "^4.14.0",
142144
"history": "^4.5.1",

src/app/containers/App.tsx

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,19 @@ const appConfig = require('../../../config/main');
22

33
import * as React from 'react';
44
import * as Helmet from 'react-helmet';
5-
import { style, cssRule } from 'typestyle';
6-
import { SiteStyles } from '../SiteStyles';
5+
import {cssRaw, style, cssRule} from 'typestyle';
6+
import { normalize, setupPage } from 'csstips';
77
import { Header } from 'components';
88

9-
// Define base stylings here
10-
// Registering a CSS rule cannot use properties with nested styles
11-
12-
cssRule('html', {
13-
boxSizing: 'border-box',
14-
});
15-
16-
cssRule('*, *:before, *:after', {
17-
boxSizing: 'inherit',
9+
// Global style
10+
cssRaw(`@import url('https://fonts.googleapis.com/css?family=Roboto');`);
11+
normalize();
12+
cssRule(`body`, {
13+
fontFamily: 'Roboto',
1814
});
15+
setupPage('#app');
1916

20-
cssRule('body',
21-
SiteStyles.backgroundColor,
22-
);
23-
24-
cssRule('a',
25-
SiteStyles.linkColor,
26-
{ textDecoration: 'none' },
27-
);
28-
29-
cssRule('a:hover',
30-
SiteStyles.linkColorOnHovered,
31-
);
32-
17+
// App container style
3318
const Styles = {
3419
container: style({
3520
padding: 0,

0 commit comments

Comments
 (0)