Skip to content

Commit 12e249f

Browse files
committed
Simplify styles for clarity
1 parent be579d4 commit 12e249f

File tree

5 files changed

+16
-18
lines changed

5 files changed

+16
-18
lines changed

src/app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ setupPage('#app');
1111
cssRaw(`
1212
#app {
1313
font-family: medium-content-sans-serif-font,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Geneva,Arial,sans-serif;
14-
background: #9c27b0;
15-
color: white;
14+
background: white;
15+
color: #333;
1616
display: flex;
1717
}
1818

src/components/Header/NavMenu.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ interface Sinks {
1313
history: Stream<string>;
1414
}
1515

16-
const whiteColor = { color: 'white' };
17-
const noTextDecoration = { textDecoration: 'none' };
18-
const cursorPointer = { cursor: 'pointer' };
1916
const navLink = {
20-
...whiteColor,
21-
...noTextDecoration
17+
color: '#333',
18+
fontSize: rem(1),
19+
fontWeight: 700,
20+
marginRight: rem(1),
21+
textDecoration: 'none',
2222
};
2323
const navLinkHover = {
2424
...navLink,
25-
...cursorPointer
25+
cursor: 'pointer'
2626
};
2727

2828
const className = style({
@@ -31,16 +31,12 @@ const className = style({
3131
$nest: {
3232
'& > a': {
3333
...navLink,
34-
marginRight: rem(1),
34+
textTransform: 'uppercase',
3535
$nest: {
3636
'&:first-child': {
3737
marginLeft: 'auto'
3838
},
39-
'&:link': navLink,
40-
'&&:visited': navLink,
41-
'&&&:hover': navLinkHover,
42-
'&&&&:active': navLink,
43-
'&&&&&:focus': navLink
39+
'&&:hover': navLinkHover,
4440
}
4541
}
4642
}

src/components/Header/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ const className = style({
1818
$nest: {
1919
'& h1': {
2020
marginBottom: 0,
21+
marginTop: 0,
2122
flex: '1 0 60%',
23+
lineHeight: 1
2224
},
2325
'& em': {
2426
fontSize: rem(1)

src/routes/About/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { RouteComponent } from 'routes';
22
import { Stream } from 'xstream';
3-
import { div } from '@cycle/dom';
3+
import { h2 } from '@cycle/dom';
44

55
const xs = Stream;
66

77
export const About: RouteComponent = sources => ({
8-
dom: xs.of(div(['About'])),
8+
dom: xs.of(h2(['About'])),
99
history: xs.empty()
1010
});

src/routes/Home/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { RouteComponent } from 'routes';
22
import { Stream } from 'xstream';
3-
import { div } from '@cycle/dom';
3+
import { h2 } from '@cycle/dom';
44

55
const xs = Stream;
66

77
export const Home: RouteComponent = sources => ({
8-
dom: xs.of(div(['Home'])),
8+
dom: xs.of(h2(['Home'])),
99
history: xs.empty()
1010
});

0 commit comments

Comments
 (0)