UNPKG

3.75 kBtext/stylusView Raw
1$font-size = 16px;
2$font-size-smaller = 12px;
3$font-size-small = 14px;
4$font-size-large = 18px;
5$font-size-huge = 20px;
6$font-weight = 300;
7$font-weight-thin = 300;
8$font-weight-bold = 500;
9$line-height = 1.4;
10$line-height-big = 1.6;
11
12.klara-ui-typography {
13 color: $c-gray-darker;
14 font-weight: $font-weight;
15 font-size: $font-size;
16 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
17 line-height: $line-height;
18
19 h1, h2, h3 {
20 margin: .2em 0;
21 font-weight: $font-weight-bold;
22 line-height: $line-height-big;
23 }
24
25 h1 {
26 font-size: 29px;
27 }
28
29 h2 {
30 font-size: 26px;
31 }
32
33 h3 {
34 font-size: 25px;
35 }
36
37 ol, ul {
38 font-size: $font-size;
39 line-height: $line-height-big;
40 }
41
42 input, textarea, select, button {
43 font-size: inherit;
44 }
45
46 select {
47 font-size: $font-size;
48 }
49
50 .font-ui {
51 $font-size-small = 14px;
52 $font-size = 16px;
53 $font-size-large = 18px;
54 $font-weight = 300;
55 $font-weight-bold = 400;
56
57 color: $c-gray-base;
58 font-size: $font-size;
59
60 &__button {
61 color: $c-gray-darker;
62 font-size: $font-size;
63
64 &--large {
65 color: $c-gray-darker;
66 font-weight: $font-weight-bold;
67 font-size: $font-size-large;
68 }
69 }
70
71 &__placeholder {
72 color: $c-gray-base !important;
73 font-weight: $font-weight;
74 font-size: $font-size;
75 }
76
77 &__text {
78 color: $c-gray-darker;
79 font-size: $font-size;
80 }
81
82 &__label {
83 color: $c-gray-dark;
84 font-weight: $font-weight;
85 font-size: $font-size;
86
87 &--sub {
88 color: $c-gray-dark;
89 font-size: $font-size-small;
90 }
91 }
92
93 p {
94 @extend .klara-ui-typography .font-ui__text;
95 }
96
97 button {
98 @extend .klara-ui-typography .font-ui__button;
99 }
100
101 label {
102 @extend .klara-ui-typography .font-ui__label;
103 }
104
105 *::placeholder, *::-webkit-input-placeholder {
106 @extend .klara-ui-typography .font-ui__placeholder;
107 }
108 }
109
110 .font-content {
111 $font-size-small = 14px;
112 $font-size = 16px;
113 $font-size-large = 21px;
114 $font-size-huge = 26px;
115 $line-height-small = 1.2;
116 $line-height = 1.4;
117 $line-height-big = 1.625;
118 $font-weight-thin = 300;
119 $font-weight = 400;
120 $font-weight-bold = 500;
121
122 font-size: $font-size;
123
124 &__headline {
125 font-size: $font-size-huge;
126 }
127
128 &__headline--sub {
129 font-size: $font-size-large;
130 }
131
132 &__preamble {
133 font-weight: $font-weight-bold;
134 font-size: $font-size;
135 }
136
137 &__quote {
138 font-weight: $font-weight-bold;
139 font-style: italic;
140 font-size: $font-size-large;
141 }
142
143 &__paragraph {
144 font-size: $font-size;
145 line-height: $line-height;
146 }
147
148 &__link {
149 color: $c-link-base;
150 font-weight: $font-weight;
151
152 &:hover {
153 color: $c-link-light;
154 }
155 }
156
157 &__card {
158 font-size: $font-size-small;
159 line-height: $line-height-small;
160
161 &__headline {
162 font-weight: $font-weight-bold;
163 font-size: $font-size;
164 }
165
166 &__preamble {
167 font-weight: $font-weight-bold;
168 font-size: $font-size-small;
169 }
170
171 &__paragraph {
172 font-size: $font-size-small;
173 }
174 }
175
176 h2 {
177 @extend .klara-ui-typography .font-content__headline;
178 }
179
180 h3:not(.font-content__card__headline) {
181 @extend .klara-ui-typography .font-content__headline--sub;
182 }
183
184 p:not(.font-content__card__paragraph):not(.font-content__card__preamble) {
185 @extend .klara-ui-typography .font-content__paragraph;
186 }
187
188 blockquote {
189 @extend .klara-ui-typography .font-content__quote;
190 }
191 }
192}