Skip to content

Commit 517a14c

Browse files
CW-179 Revise Typography Guide (#98)
* Display every combination of the grid system * Change vertical gap * Upload the font files * add new typography hierarchy * adjust the line height of the paragraph * fix incomplete comments * Upload svg file for fonts * Recover the import of fonts and update the button * Remove Quicksand font from development. * Import CoreSansC through font-family. * Moved fonts into assets. * Move fonts to styles folder. * Upload new fonts weights * Remove font family from variables. * Add full font folder. * Import fonts from assets folder. * Install css-loader due to creation of css. * Rename font families to import all in one go. * Remove fonts from styles folder. * Correct font weights to align with the styleguide Co-authored-by: Tommy Truong <[email protected]>
1 parent a853550 commit 517a14c

File tree

82 files changed

+950
-25
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+950
-25
lines changed

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"@vue/eslint-config-airbnb": "^5.1.0",
2323
"@vue/test-utils": "^1.0.3",
2424
"babel-eslint": "^10.0.1",
25+
"css-loader": "^4.2.2",
2526
"cypress": "^4.12.1",
2627
"eslint": "^7.6.0",
2728
"eslint-plugin-cypress": "^2.11.1",

frontend/public/index.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,8 @@
1010

1111
<link rel="preload" as="style"
1212
href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
13-
<link rel="preload" as="style"
14-
href="https://fonts.googleapis.com/css?family=Quicksand:400,500&display=swap">
15-
1613

1714
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
18-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Quicksand:400,500&display=swap">
1915
</head>
2016

2117
<body>

frontend/src/App.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,13 @@ export default {
4343
};
4444
</script>
4545

46-
<style>
46+
<style lang="scss">
47+
@import 'assets/font/stylesheet.css';
4748
/** Must keep html and body seperate to allow scrolling */
4849
* {
4950
margin: 0;
5051
padding: 0;
51-
font-family: "Quicksand", sans-serif;
52+
font-family: 'Core Sans C', Arial, sans-serif;
5253
}
5354
5455
html {
97.7 KB
Binary file not shown.
97.5 KB
Binary file not shown.
43.8 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
48.2 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
96.4 KB
Binary file not shown.
96.2 KB
Binary file not shown.
Binary file not shown.
29.2 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
95.9 KB
Binary file not shown.
95.7 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
95.1 KB
Binary file not shown.
94.9 KB
Binary file not shown.
42.8 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
95.4 KB
Binary file not shown.
95.2 KB
Binary file not shown.
43.9 KB
Binary file not shown.
29.3 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
95.3 KB
Binary file not shown.
95.1 KB
Binary file not shown.
43.6 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
95.4 KB
Binary file not shown.
95.2 KB
Binary file not shown.
Binary file not shown.
28.6 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

frontend/src/assets/font/demo.html

Lines changed: 649 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
@font-face {
2+
font-family: 'Core Sans C';
3+
src: url('CoreSansC-15Thin.eot');
4+
src: local('Core Sans C 15 Thin'), local('CoreSansC-15Thin'),
5+
url('CoreSansC-15Thin.eot?#iefix') format('embedded-opentype'),
6+
url('CoreSansC-15Thin.woff2') format('woff2'),
7+
url('CoreSansC-15Thin.woff') format('woff'),
8+
url('CoreSansC-15Thin.ttf') format('truetype');
9+
font-weight: 100;
10+
font-style: normal;
11+
}
12+
13+
@font-face {
14+
font-family: 'Core Sans C';
15+
src: url('CoreSansC-65BoldIt.eot');
16+
src: local('Core Sans C 65 Bold Italic'), local('CoreSansC-65BoldIt'),
17+
url('CoreSansC-65BoldIt.eot?#iefix') format('embedded-opentype'),
18+
url('CoreSansC-65BoldIt.woff2') format('woff2'),
19+
url('CoreSansC-65BoldIt.woff') format('woff'),
20+
url('CoreSansC-65BoldIt.ttf') format('truetype');
21+
font-weight: bold;
22+
font-style: italic;
23+
}
24+
25+
@font-face {
26+
font-family: 'Core Sans C';
27+
src: url('CoreSansC-25ExtraLightIt.eot');
28+
src: local('Core Sans C 25 ExtraLight Italic'), local('CoreSansC-25ExtraLightIt'),
29+
url('CoreSansC-25ExtraLightIt.eot?#iefix') format('embedded-opentype'),
30+
url('CoreSansC-25ExtraLightIt.woff2') format('woff2'),
31+
url('CoreSansC-25ExtraLightIt.woff') format('woff'),
32+
url('CoreSansC-25ExtraLightIt.ttf') format('truetype');
33+
font-weight: 200;
34+
font-style: italic;
35+
}
36+
37+
@font-face {
38+
font-family: 'Core Sans C';
39+
src: url('CoreSansC-65Bold.eot');
40+
src: local('Core Sans C 65 Bold'), local('CoreSansC-65Bold'),
41+
url('CoreSansC-65Bold.eot?#iefix') format('embedded-opentype'),
42+
url('CoreSansC-65Bold.woff2') format('woff2'),
43+
url('CoreSansC-65Bold.woff') format('woff'),
44+
url('CoreSansC-65Bold.ttf') format('truetype');
45+
font-weight: bold;
46+
font-style: normal;
47+
}
48+
49+
@font-face {
50+
font-family: 'Core Sans C';
51+
src: url('CoreSansC-35LightIt.eot');
52+
src: local('Core Sans C 35 Light Italic'), local('CoreSansC-35LightIt'),
53+
url('CoreSansC-35LightIt.eot?#iefix') format('embedded-opentype'),
54+
url('CoreSansC-35LightIt.woff2') format('woff2'),
55+
url('CoreSansC-35LightIt.woff') format('woff'),
56+
url('CoreSansC-35LightIt.ttf') format('truetype');
57+
font-weight: 300;
58+
font-style: italic;
59+
}
60+
61+
@font-face {
62+
font-family: 'Core Sans C';
63+
src: url('CoreSansC-55Medium.eot');
64+
src: local('Core Sans C 55 Medium'), local('CoreSansC-55Medium'),
65+
url('CoreSansC-55Medium.eot?#iefix') format('embedded-opentype'),
66+
url('CoreSansC-55Medium.woff2') format('woff2'),
67+
url('CoreSansC-55Medium.woff') format('woff'),
68+
url('CoreSansC-55Medium.ttf') format('truetype');
69+
font-weight: 500;
70+
font-style: normal;
71+
}
72+
73+
@font-face {
74+
font-family: 'Core Sans C';
75+
src: url('CoreSansC-85HeavyIt.eot');
76+
src: local('Core Sans C 85 Heavy Italic'), local('CoreSansC-85HeavyIt'),
77+
url('CoreSansC-85HeavyIt.eot?#iefix') format('embedded-opentype'),
78+
url('CoreSansC-85HeavyIt.woff2') format('woff2'),
79+
url('CoreSansC-85HeavyIt.woff') format('woff'),
80+
url('CoreSansC-85HeavyIt.ttf') format('truetype');
81+
font-weight: 900;
82+
font-style: italic;
83+
}
84+
85+
@font-face {
86+
font-family: 'Core Sans C';
87+
src: url('CoreSansC-15ThinIt.eot');
88+
src: local('Core Sans C 15 Thin Italic'), local('CoreSansC-15ThinIt'),
89+
url('CoreSansC-15ThinIt.eot?#iefix') format('embedded-opentype'),
90+
url('CoreSansC-15ThinIt.woff2') format('woff2'),
91+
url('CoreSansC-15ThinIt.woff') format('woff'),
92+
url('CoreSansC-15ThinIt.ttf') format('truetype');
93+
font-weight: 100;
94+
font-style: italic;
95+
}
96+
97+
@font-face {
98+
font-family: 'Core Sans C';
99+
src: url('CoreSansC-45RegularIt.eot');
100+
src: local('Core Sans C 45 Regular Italic'), local('CoreSansC-45RegularIt'),
101+
url('CoreSansC-45RegularIt.eot?#iefix') format('embedded-opentype'),
102+
url('CoreSansC-45RegularIt.woff2') format('woff2'),
103+
url('CoreSansC-45RegularIt.woff') format('woff'),
104+
url('CoreSansC-45RegularIt.ttf') format('truetype');
105+
font-weight: normal;
106+
font-style: italic;
107+
}
108+
109+
@font-face {
110+
font-family: 'Core Sans C';
111+
src: url('CoreSansC-25ExtraLight.eot');
112+
src: local('Core Sans C 25 ExtraLight'), local('CoreSansC-25ExtraLight'),
113+
url('CoreSansC-25ExtraLight.eot?#iefix') format('embedded-opentype'),
114+
url('CoreSansC-25ExtraLight.woff2') format('woff2'),
115+
url('CoreSansC-25ExtraLight.woff') format('woff'),
116+
url('CoreSansC-25ExtraLight.ttf') format('truetype');
117+
font-weight: 200;
118+
font-style: normal;
119+
}
120+
121+
@font-face {
122+
font-family: 'Core Sans C';
123+
src: url('CoreSansC-75ExtraBoldIt.eot');
124+
src: local('Core Sans C 75 ExtraBold Italic'), local('CoreSansC-75ExtraBoldIt'),
125+
url('CoreSansC-75ExtraBoldIt.eot?#iefix') format('embedded-opentype'),
126+
url('CoreSansC-75ExtraBoldIt.woff2') format('woff2'),
127+
url('CoreSansC-75ExtraBoldIt.woff') format('woff'),
128+
url('CoreSansC-75ExtraBoldIt.ttf') format('truetype');
129+
font-weight: 800;
130+
font-style: italic;
131+
}
132+
133+
@font-face {
134+
font-family: 'Core Sans C';
135+
src: url('CoreSansC-55MediumIt.eot');
136+
src: local('Core Sans C 55 Medium Italic'), local('CoreSansC-55MediumIt'),
137+
url('CoreSansC-55MediumIt.eot?#iefix') format('embedded-opentype'),
138+
url('CoreSansC-55MediumIt.woff2') format('woff2'),
139+
url('CoreSansC-55MediumIt.woff') format('woff'),
140+
url('CoreSansC-55MediumIt.ttf') format('truetype');
141+
font-weight: 500;
142+
font-style: italic;
143+
}
144+
145+
@font-face {
146+
font-family: 'Core Sans C';
147+
src: url('CoreSansC-95Black.eot');
148+
src: local('Core Sans C 95 Black'), local('CoreSansC-95Black'),
149+
url('CoreSansC-95Black.eot?#iefix') format('embedded-opentype'),
150+
url('CoreSansC-95Black.woff2') format('woff2'),
151+
url('CoreSansC-95Black.woff') format('woff'),
152+
url('CoreSansC-95Black.ttf') format('truetype');
153+
font-weight: 900;
154+
font-style: normal;
155+
}
156+
157+
@font-face {
158+
font-family: 'Core Sans C';
159+
src: url('CoreSansC-75ExtraBold.eot');
160+
src: local('Core Sans C 75 ExtraBold'), local('CoreSansC-75ExtraBold'),
161+
url('CoreSansC-75ExtraBold.eot?#iefix') format('embedded-opentype'),
162+
url('CoreSansC-75ExtraBold.woff2') format('woff2'),
163+
url('CoreSansC-75ExtraBold.woff') format('woff'),
164+
url('CoreSansC-75ExtraBold.ttf') format('truetype');
165+
font-weight: 800;
166+
font-style: normal;
167+
}
168+
169+
@font-face {
170+
font-family: 'Core Sans C';
171+
src: url('CoreSansC-95BlackIt.eot');
172+
src: local('Core Sans C 95 Black Italic'), local('CoreSansC-95BlackIt'),
173+
url('CoreSansC-95BlackIt.eot?#iefix') format('embedded-opentype'),
174+
url('CoreSansC-95BlackIt.woff2') format('woff2'),
175+
url('CoreSansC-95BlackIt.woff') format('woff'),
176+
url('CoreSansC-95BlackIt.ttf') format('truetype');
177+
font-weight: 900;
178+
font-style: italic;
179+
}
180+
181+
@font-face {
182+
font-family: 'Core Sans C';
183+
src: url('CoreSansC-35Light.eot');
184+
src: local('Core Sans C 35 Light'), local('CoreSansC-35Light'),
185+
url('CoreSansC-35Light.eot?#iefix') format('embedded-opentype'),
186+
url('CoreSansC-35Light.woff2') format('woff2'),
187+
url('CoreSansC-35Light.woff') format('woff'),
188+
url('CoreSansC-35Light.ttf') format('truetype');
189+
font-weight: 300;
190+
font-style: normal;
191+
}
192+
193+
@font-face {
194+
font-family: 'Core Sans C';
195+
src: url('CoreSansC-85Heavy.eot');
196+
src: local('Core Sans C 85 Heavy'), local('CoreSansC-85Heavy'),
197+
url('CoreSansC-85Heavy.eot?#iefix') format('embedded-opentype'),
198+
url('CoreSansC-85Heavy.woff2') format('woff2'),
199+
url('CoreSansC-85Heavy.woff') format('woff'),
200+
url('CoreSansC-85Heavy.ttf') format('truetype');
201+
font-weight: 900;
202+
font-style: normal;
203+
}
204+
205+
@font-face {
206+
font-family: 'Core Sans C';
207+
src: url('CoreSansC-45Regular.eot');
208+
src: local('Core Sans C Regular'), local('CoreSansC-45Regular'),
209+
url('CoreSansC-45Regular.eot?#iefix') format('embedded-opentype'),
210+
url('CoreSansC-45Regular.woff2') format('woff2'),
211+
url('CoreSansC-45Regular.woff') format('woff'),
212+
url('CoreSansC-45Regular.ttf') format('truetype');
213+
font-weight: normal;
214+
font-style: normal;
215+
}
216+

frontend/src/styles/abstracts/_variables.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ $grid-columns: 12;
3636
$grid-gap: 40px;
3737
$gap-horizontal: $grid-gap;
3838
$gap-vertical: $grid-gap * 3;
39+

frontend/src/styles/base/_typography.scss

Lines changed: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
// ----------------------------------------------------------------------
88
// #Type Scale
99
// ----------------------------------------------------------------------
10-
$text-xs: 1em / math.pow($text-scale-ratio, 1); //caption
11-
$text-sm: 1em / math.pow($text-scale-ratio, 0.5); //button
12-
$text-md: 1em * math.pow($text-scale-ratio, 4); // h4
13-
$text-lg: 1em * math.pow($text-scale-ratio, 5); // h3
14-
$text-xl: 1em * math.pow($text-scale-ratio, 6); // h2
15-
$text-xxl: 1em * math.pow($text-scale-ratio, 8); //h1
10+
$text-xs: 1em ; //caption
11+
$text-sm: 1em * math.pow($text-scale-ratio, 1); // h4
12+
$text-md: 1em * math.pow($text-scale-ratio, 2);
13+
$text-lg: 1em * math.pow($text-scale-ratio, 3); // h2 h3
14+
$text-xl: 1em * math.pow($text-scale-ratio, 6); // h1
15+
$text-xxl: 1em * math.pow($text-scale-ratio, 8);
1616
$text-xxxl: 1em * math.pow($text-scale-ratio, 9);
1717

1818
// ----------------------------------------------------------------------
1919
// #Line Height
2020
// ----------------------------------------------------------------------
2121
$heading-line-height: 1.5;
22-
$body-line-height:1.2;
22+
$body-line-height: 2.5;
2323

2424
body {
2525
font-size: $text-base-size;
@@ -37,43 +37,70 @@ h1, h2, h3, h4, form legend {
3737
font-size: $text-xxxl;
3838
}
3939

40-
h1, .text--xxl {
41-
font-size: $text-xxl;
40+
.text--xxl {
41+
font-size: $text-xxl;
4242
}
4343

44-
h2, .text--xl {
44+
.text--xl {
4545
font-size: $text-xl;
4646
}
4747

48-
h3, .text--lg {
48+
.text--lg {
4949
font-size: $text-lg;
5050
}
5151

52-
h4, .text--md {
52+
.text--md {
5353
font-size: $text-md;
5454
}
5555

56-
.text--sm, small {
56+
.text--sm {
5757
font-size: $text-sm;
5858
}
5959

6060
.text--xs {
6161
font-size: $text-xs;
6262
}
6363

64+
h1 {
65+
font-size: $text-xl;
66+
font-weight: 800;
67+
}
68+
69+
h2 {
70+
font-size: $text-lg;
71+
font-weight: 800;
72+
}
73+
74+
h3 {
75+
font-size: $text-lg;
76+
font-weight: 200;
77+
}
78+
79+
h4 {
80+
font-size: $text-sm;
81+
font-weight: 800;
82+
}
83+
6484
p {
65-
line-height: $body-line-height;
85+
font-size: $text-xs;
86+
font-weight: 200;
87+
line-height: $body-line-height;
88+
margin-bottom: $space-xxxs;
6689
}
6790

91+
button {
92+
font-size: $text-sm;
93+
font-weight: 800;
94+
}
6895
// ----------------------------------------------------------------------
6996
// #Text Component - class used to stylize blocks
7097
// ----------------------------------------------------------------------
7198
.text-container {
7299
h2, h3, h4 {
73-
margin-top: $space-sm;
100+
margin-top: $space-md;
74101
}
75102

76103
ul, ol, p {
77-
margin-bottom: $space-md;
104+
margin-bottom: $space-sm;
78105
}
79106
}

frontend/src/styles/components/_buttons.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ $btn-lg: $btn-font-size+0.4em;
2626
text-decoration: none;
2727
line-height: 1;
2828

29-
padding: $space-xs $space-sm;
29+
padding: $space-sm $space-md;
3030
border-radius: $btn-radius;
3131
font-size: $btn-font-size;
3232

0 commit comments

Comments
 (0)