-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathfont-scale.scss
60 lines (58 loc) · 1.17 KB
/
font-scale.scss
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
58
59
60
@use 'sass:map';
@mixin font-scale($size: 'base') {
$scale: map.get(
(
's-small': (
'font-size': 10px,
'line-height': 1.5,
),
'x-small': (
'font-size': 12px,
'line-height': 1.5,
),
'small': (
'font-size': 14px,
'line-height': 24px,
),
'base': (
'font-size': 16px,
'line-height': 1.25,
),
'medium': (
'font-size': 20px,
'line-height': 1.5,
),
'x2-medium': (
'font-size': 22px,
'line-height': 32px,
),
'x3-medium': (
'font-size': 24px,
'line-height': 1.4,
),
'x4-medium': (
'font-size': 28px,
'line-height': 40px,
),
'large': (
'font-size': 32px,
'line-height': 48px,
),
'x2-large': (
'font-size': 40px,
'line-height': 1.5,
),
'x3-large': (
'font-size': 48px,
'line-height': 64px,
),
'x4-large': (
'font-size': 64px,
'line-height': 72px,
),
),
$size
);
line-height: map.get($scale, 'line-height');
font-size: map.get($scale, 'font-size');
}