Skip to content

Commit 1300297

Browse files
committed
Add Typography mixins and font variables
1 parent 9c38b70 commit 1300297

2 files changed

Lines changed: 68 additions & 2 deletions

File tree

styles/_typography.scss

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
@use './variables' as *;
2+
@use './mixins' as *;
3+
4+
@mixin typography-header-page {
5+
font-family: $font-family-primary;
6+
font-size: $font-size-lg;
7+
font-weight: $font-weight-bold;
8+
line-height: $line-height-lg;
9+
}
10+
11+
@mixin typography-header-sub {
12+
font-family: $font-family-primary;
13+
font-size: $font-size-md;
14+
font-weight: $font-weight-bold;
15+
line-height: $line-height-md;
16+
}
17+
18+
@mixin typography-copy {
19+
font-family: $font-family-secondary;
20+
font-size: $font-size-sm;
21+
font-weight: $font-weight-regular;
22+
line-height: $line-height-sm;
23+
}
24+
25+
@mixin typography-label {
26+
@include typography-copy;
27+
}
28+
29+
@mixin typography-input {
30+
@include typography-copy;
31+
}
32+
33+
@mixin typography-placeholder {
34+
@include typography-copy;
35+
}
36+
37+
@mixin typography-link {
38+
font-family: $font-family-secondary;
39+
font-size: $font-size-xs;
40+
font-weight: $font-weight-regular;
41+
line-height: $line-height-sm;
42+
43+
@include desktop {
44+
font-size: $font-size-sm;
45+
}
46+
}
47+
48+
@mixin typography-button {
49+
@include typography-copy;
50+
}

styles/_variables.scss

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,22 @@ $medium-desktop-breakpoint: 1250px;
1010
$large-desktop-breakpoint: 1440px;
1111
$extra-large-breakpoint: 2560px;
1212

13-
//Fonts
13+
// Font Tokens
14+
// Font Family
1415
$font-family-primary: 'Assistant', sans-serif;
15-
$font-family-secondary: 'Open Sans', sans-serif;
16+
$font-family-secondary: 'Opens Sans', sans-serif;
17+
18+
// Font Size
19+
$font-size-xs: 1.25rem; // 20px
20+
$font-size-sm: 1.5rem; // 24px
21+
$font-size-md: 2.25rem; // 36px
22+
$font-size-lg: 4.5rem; // 72px
23+
24+
// Font Weight
25+
$font-weight-regular: 400;
26+
$font-weight-bold: 700;
27+
28+
// Line Height
29+
$line-height-sm: 1.9375rem; // 31px
30+
$line-height-md: 2.875rem; // 46px
31+
$line-height-lg: 5rem; // 80px

0 commit comments

Comments
 (0)