Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

Commit 0029bb8

Browse files
authored
Adds a css reset. (#5)
1 parent 8566f42 commit 0029bb8

File tree

4 files changed

+106
-4
lines changed

4 files changed

+106
-4
lines changed

fuse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const isProduction = process.env.NODE_ENV === 'production'
1010
// copy the renderer's html file into the right place
1111
Sparky.task('copy-html', () => {
1212
return Sparky
13-
.src('src/renderer/index.html')
13+
.src('src/renderer/{index.html,*.css}')
1414
.dest(`${OUTPUT_DIR}/$name`)
1515
})
1616

src/renderer/app/app.tsx

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,29 @@
11
import * as React from 'react'
22
import { Text } from '../platform'
33

4+
const appStyle = {
5+
flex: 1,
6+
display: 'flex',
7+
flexDirection: 'column',
8+
height: '100vh',
9+
width: '100vw',
10+
overflow: 'hidden',
11+
backgroundColor: 'rebeccapurple',
12+
color: 'white',
13+
justifyContent: 'center',
14+
alignItems: 'center',
15+
fontFamily: "'Avenir Next', sans-serif",
16+
fontSize: '1.5rem',
17+
userSelect: 'none',
18+
cursor: 'default'
19+
}
20+
421
export class App extends React.Component<{}, {}> {
5-
render () {
6-
return <Text>Welcome</Text>
22+
render() {
23+
return (
24+
<div style={appStyle}>
25+
<Text>Wake up and smell the electrons.</Text>
26+
</div>
27+
)
728
}
829
}

src/renderer/index.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
<!DOCTYPE html>
22
<html lang="en">
3+
34
<head>
45
<meta charset="UTF-8">
56
<meta name="viewport" content="width=device-width">
7+
<title>Welcome</title>
8+
<style>
9+
@import url('./reset.css');
10+
</style>
611
</head>
12+
713
<body>
814
<div id='root'></div>
915
<script type="text/javascript" src="renderer.js"></script>
1016
</body>
11-
</html>
17+
18+
</html>

src/renderer/reset.css

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/* A CSS Reset. */
2+
3+
*:focus {
4+
outline: 0;
5+
}
6+
7+
body,
8+
h1,
9+
h2,
10+
h3,
11+
h4,
12+
h5,
13+
h6,
14+
hr,
15+
p,
16+
blockquote,
17+
dl,
18+
dt,
19+
dd,
20+
ul,
21+
ol,
22+
li,
23+
pre,
24+
form,
25+
fieldset,
26+
legend,
27+
button,
28+
input,
29+
textarea,
30+
th,
31+
td {
32+
margin: 0;
33+
padding: 0;
34+
vertical-align: baseline;
35+
}
36+
37+
img {
38+
border: 0 none;
39+
vertical-align: top;
40+
}
41+
42+
i,
43+
em {
44+
font-style: normal;
45+
}
46+
47+
ol,
48+
ul {
49+
list-style: none;
50+
}
51+
52+
input,
53+
select,
54+
button,
55+
h1,
56+
h2,
57+
h3,
58+
h4,
59+
h5,
60+
h6 {
61+
font-size: 100%;
62+
font-family: inherit;
63+
}
64+
65+
table {
66+
border-collapse: collapse;
67+
border-spacing: 0;
68+
}
69+
70+
a,
71+
a:visited {
72+
text-decoration: none;
73+
color: #333;
74+
}

0 commit comments

Comments
 (0)