-
-
Notifications
You must be signed in to change notification settings - Fork 389
Expand file tree
/
Copy pathcreateSheet.js
More file actions
57 lines (51 loc) · 1.27 KB
/
createSheet.js
File metadata and controls
57 lines (51 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import {create} from 'jss'
import template from '../../src/index'
import parse from '../../src/parse'
const options = {Renderer: null}
const jss = create(options).use(template({cache: false}))
const css = `
color: rgb(77, 77, 77);
cursor: auto;
widows: 2;
quotes: initial;
orphans: 2;
tab-size: 8;
direction: initial;
font-size: 15px;
word-wrap: normal;
font-style: normal;
visibility: visible;
word-break: normal;
text-align: initial;
box-sizing: border-box;
font-weight: normal;
white-space: normal;
line-height: normal;
font-family: proxima-nova, "Helvetica Neue", Arial, Helvetica, sans-serif;
empty-cells: show;
text-indent: 0px;
text-shadow: none;
font-stretch: normal;
caption-side: top;
word-spacing: normal;
text-transform: none;
letter-spacing: normal;
text-rendering: optimizeLegibility;
border-collapse: separate;
text-align-last: auto;
list-style-type: disc;
list-style-image: none;
list-style-position: outside;
text-decoration-color: initial;
font-variant: normal normal;
border-spacing: 0px;
`
const style = parse(css)
suite('Create Sheet', () => {
benchmark('template', () => {
jss.createStyleSheet({button: css})
})
benchmark('object', () => {
jss.createStyleSheet({button: style})
})
})