-
Notifications
You must be signed in to change notification settings - Fork 142
/
_typography.scss
103 lines (88 loc) · 1.69 KB
/
_typography.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// stylelint-disable declaration-property-unit-allowed-list
// Everything around fonts, font size definitions and typeset
// presets. No modular scale, but a sophisticated viewport
// based responsive mixin can be found in _helpers.scss
// Set root size for rems
:root {
font-size: 62.5%;
}
// Typography settings
.is-root-container,
.acf-block-preview .block,
body {
color: var(--color-paragraph);
font-family: var(--font-paragraph);
font-size: var(--font-size-paragraph);
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-weight: var(--font-weight-paragraph);
line-height: var(--line-height-paragraph);
// stylelint-disable-next-line value-keyword-case
text-rendering: geometricPrecision;
}
// Heading defaults
h1,
h2,
h3,
h4,
h5,
h6 {
color: var(--color-heading);
font-family: var(--font-heading);
font-weight: var(--font-weight-heading);
margin-bottom: var(--margin-between-paragraphs);
margin-top: var(--margin-between-paragraphs);
}
h2,
h3,
h4,
h5,
h6 {
line-height: var(--line-height-heading);
}
// Define heading scales
// Current: Perfect fourth: https://type-scale.com/
h1 {
font-size: var(--font-size-h1);
}
h2 {
font-size: var(--font-size-h2);
}
h3 {
font-size: var(--font-size-h3);
}
h4 {
font-size: var(--font-size-h4);
}
h5 {
font-size: var(--font-size-h5);
}
h6 {
font-size: var(--font-size-h6);
}
h1:first-child,
h2:first-child,
h3:first-child,
h4:first-child,
h5:first-child,
h6:first-child {
margin-top: 0;
}
// Bold
b,
strong {
font-weight: var(--font-weight-bold);
}
// Italic
em,
i {
font-style: italic;
}
// Default paragraphs
p {
margin-bottom: 2.9rem;
margin-top: 2.9rem;
}
p:last-child {
margin-bottom: 0;
}