Skip to content

Commit a97231e

Browse files
committed
Icon font for Hamburger example
1 parent b8946b6 commit a97231e

File tree

6 files changed

+23
-11
lines changed

6 files changed

+23
-11
lines changed

example/fonts/rack-icons.ttf

5.48 KB
Binary file not shown.

example/fonts/rack-icons.woff

1.72 KB
Binary file not shown.

example/fonts/rack-icons.woff2

1.22 KB
Binary file not shown.

example/src/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
33
import { hashHistory } from 'react-router';
4+
45
import Routes from './router';
6+
7+
import '../styles/fonts.css';
58
import './index.css';
69

710
ReactDOM.render(

example/styles/fonts.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@font-face {
2+
font-family: 'rac-icons';
3+
src: url('./../fonts/rack-icons.woff2') format('woff2'),
4+
url('./../fonts/rack-icons.woff') format('woff');
5+
font-weight: normal;
6+
font-style: normal;
7+
}

example/styles/hamburger.css

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,32 @@
2020

2121
.hamburger__node--contracted::before {
2222
position: absolute;
23-
top: 9px;
23+
top: 14px;
2424
right: 12px;
25-
content: '+';
26-
font: 20px/1 Arial;
25+
content: '\EA06';
26+
font-family: rack-icons;
27+
font-size: 22px;
28+
line-height: 1;
2729
color: white;
2830
z-index: 1;
2931
}
3032

3133
.hamburger__node--expanded::before {
3234
position: absolute;
33-
top: 6px;
34-
right: 14px;
35-
content: '-';
36-
font: 24px/1 Arial;
35+
top: 14px;
36+
right: 12px;
37+
content: '\EA07';
38+
font: 22px/1 rack-icons;
3739
color: white;
3840
z-index: 1;
3941
}
4042

4143
.hamburger__node--leaf::before {
4244
position: absolute;
43-
top: 13px;
44-
right: 6px;
45-
content: '';
46-
font: 13px/1 Arial;
45+
top: 14px;
46+
right: 12px;
47+
content: '\EA0A';
48+
font: 22px/1 rack-icons;
4749
color: white;
4850
}
4951

0 commit comments

Comments
 (0)