UNPKG

793 Btext/stylusView Raw
1// DEPRECATED: Span
2_headerSizes = {
3 h1: xxxxxl,
4 h2: xxxxl,
5 h3: xxxl,
6 h4: xxl,
7 h5: xl,
8 h6: l
9}
10
11font(size = m)
12 // Workaround global built-in function s()
13 // http://stylus-lang.com/docs/bifs.html#sfmt-
14 size = _headerSizes[size] || size // DEPRECATED: Span
15 size = 's' if size is s
16 font-size: $UI.fontSizes[size]
17 line-height $UI.lineHeights[size]
18
19text(key = default)
20 // color
21 if key is description
22 color: $UI.colors.secondaryText
23 else
24 color: $UI.colors.mainText
25
26 // font, line
27 if key is default
28 font()
29 else if key is description
30 font()
31 else if key is h1
32 font(xxxxxl)
33 else if key is h2
34 font(xxxxl)
35 else if key is h3
36 font(xxxl)
37 else if key is h4
38 font(xxl)
39 else if key is h5
40 font(xl)
41 else if key is h6
42 font(l)