forked from vaadin/vaadin-lumo-styles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
typography.html
129 lines (110 loc) · 3.12 KB
/
typography.html
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<link rel="import" href="version.html">
<link rel="import" href="../polymer/lib/elements/custom-style.html">
<custom-style>
<style>
html {
/* Font families */
--lumo-font-family: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
/* Font sizes */
--lumo-font-size-xxs: .75rem;
--lumo-font-size-xs: .8125rem;
--lumo-font-size-s: .875rem;
--lumo-font-size-m: 1rem;
--lumo-font-size-l: 1.125rem;
--lumo-font-size-xl: 1.375rem;
--lumo-font-size-xxl: 1.75rem;
--lumo-font-size-xxxl: 2.5rem;
/* Line heights */
--lumo-line-height-xs: 1.25;
--lumo-line-height-s: 1.375;
--lumo-line-height-m: 1.625;
}
</style>
</custom-style>
<dom-module id="lumo-typography">
<template>
<style>
html {
font-family: var(--lumo-font-family);
font-size: var(--lumo-font-size, var(--lumo-font-size-m));
line-height: var(--lumo-line-height-m);
-webkit-text-size-adjust: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Can’t combine with the above selector because that doesn’t work in browsers without native shadow dom */
:host {
font-family: var(--lumo-font-family);
font-size: var(--lumo-font-size, var(--lumo-font-size-m));
line-height: var(--lumo-line-height-m);
-webkit-text-size-adjust: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
small,
[theme~="font-size-s"] {
font-size: var(--lumo-font-size-s);
line-height: var(--lumo-line-height-s);
}
[theme~="font-size-xs"] {
font-size: var(--lumo-font-size-xs);
line-height: var(--lumo-line-height-xs);
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: 600;
line-height: var(--lumo-line-height-xs);
margin-top: 1.25em;
}
h1 {
font-size: var(--lumo-font-size-xxxl);
margin-bottom: 0.75em;
}
h2 {
font-size: var(--lumo-font-size-xxl);
margin-bottom: 0.5em;
}
h3 {
font-size: var(--lumo-font-size-xl);
margin-bottom: 0.5em;
}
h4 {
font-size: var(--lumo-font-size-l);
margin-bottom: 0.5em;
}
h5 {
font-size: var(--lumo-font-size-m);
margin-bottom: 0.25em;
}
h6 {
font-size: var(--lumo-font-size-xs);
margin-bottom: 0;
text-transform: uppercase;
letter-spacing: 0.03em;
}
p {
margin-top: 0.5em;
margin-bottom: 0.75em;
}
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
hr {
display: block;
align-self: stretch;
height: 1px;
border: 0;
padding: 0;
margin: var(--lumo-space-s) calc(var(--lumo-border-radius) / 2);
background-color: var(--lumo-contrast-10pct);
}
</style>
</template>
</dom-module>