Skip to content

Commit 1845e28

Browse files
committed
Scaffolding: update base elements font-size to match GCDS
1 parent 11f7d54 commit 1845e28

File tree

14 files changed

+117
-27
lines changed

14 files changed

+117
-27
lines changed

common/scaffolding/text-level-semantics.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,3 +203,7 @@ <h2>The <code>wbr</code> element</h2>
203203
<pre><code>
204204
www.simply&lt;wbr>orange&lt;wbr>juice.com
205205
</code></pre>
206+
207+
<h2>The <code>blockquote</code> element</h2>
208+
<blockquote>This is a quote</blockquote>
209+
<pre><code>&lt;blockquote>This is a quote&lt;/blockquote></code></pre>

common/scaffolding/texte-niveau-semantique.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,8 @@ <h2>The <code>wbr</code> element</h2>
203203
<pre><code>
204204
www.simply&lt;wbr>orange&lt;wbr>juice.com
205205
</code></pre>
206+
207+
<h2>The <code>blockquote</code> element</h2>
208+
<blockquote>This is a quote</blockquote>
209+
<pre><code>&lt;blockquote>This is a quote&lt;/blockquote></code></pre>
206210
</div>

common/text-level-modifiers/_base.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@
88
.fnt-hdng {
99
@include defaults-alternative-font-family();
1010
}
11+
12+
.lead {
13+
font-size: 1.2em;
14+
}

common/text-level-modifiers/text-level-modifiers-en.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,7 @@ <h4><code>.text-uppercase</code></h4>
112112
<h4><code>.text-capitalize</code></h4>
113113
<p class="text-capitalize">capitalize text.</p>
114114
<pre><code>&lt;p <strong>class=&quot;text-capitalize&quot;</strong>&gt;capitalize text&lt;/p&gt;</code></pre>
115+
116+
<h4><code>.lead</code></h4>
117+
<p class="lead">Enlarge text for leading text. Lorem ipsum dolor sit amet consectetur adipisicing elit. Eius cupiditate doloribus, accusantium dicta doloremque harum fugiat quidem perspiciatis? Mollitia, eligendi?</p>
118+
<pre><code>&lt;p class="lead">Enlarge text for leading text. Lorem ipsum dolor sit amet consectetur adipisicing elit. Eius cupiditate doloribus, accusantium dicta doloremque harum fugiat quidem perspiciatis? Mollitia, eligendi?&lt;/p></code></pre>

sites/_variables.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ $padding-base-vertical: 10px;
3737
$padding-base-horizontal: 14px;
3838

3939
/* Headings font-sizes */
40-
$font-size-h1: 1.9em; // expected 38px;
41-
$font-size-h2: 1.8em; // expected 36px;
42-
$font-size-h3: 1.2em; // expected 24px;
43-
$font-size-h4: 1.1em; // expected 22px;
44-
$font-size-h5: 1em; // expected 20px;
45-
$font-size-h6: .95em; // expected 19px;
40+
$font-size-h1: 2.5625rem; // expected 41px;
41+
$font-size-h2: 2.4375rem; // expected 39px;
42+
$font-size-h3: 1.8125rem; // expected 29px;
43+
$font-size-h4: 1.6875rem; // expected 27px;
44+
$font-size-h5: 1.5rem; // expected 24px;
45+
$font-size-h6: 1.375rem; // expected 22px;
4646

4747
/* Small font-size */
4848
$small-size: 87%;

sites/baseline/_forms.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ input[placeholder],
2929
* - Fieldflow is brought to speed with the visual update with a clearly defined temporary class .gc-font-2019, but the class can be tried out on other forms
3030
*/
3131
:not(#wb-srch) form, .checkbox, .checkbox-inline, .radio, .radio-inline, form .btn:not(.btn-call-to-action) {
32-
font-size: 16px;
33-
line-height: 23px;
32+
font-size: 1rem;
33+
line-height: 1.4375;
3434
}
3535
form .btn:not(.btn-call-to-action), .form-control {
3636
padding: 6px 12px;
3737
}
3838
legend {
39+
font-size: 1.2em;
3940
line-height: 1.65em;
4041
}
4142

sites/baseline/_heading-screen-sm-max.scss

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,37 @@
77
// Heading font-sizes
88
h1,
99
.h1 {
10-
font-size: 1.7em; // expected 34px;
11-
margin-top: .75em; // expected ~26px;
10+
font-size: 2.3125rem; // expected 37px;
11+
line-height: 1.19;
12+
margin-top: 1.265rem; // expected ~26px;
1213
}
1314

1415
h2,
1516
.h2 {
16-
font-size: 1.6em; // expected 342x;
17+
font-size: 2.1875rem; // expected 35px;
18+
line-height: 1.25;
19+
}
20+
21+
h3,
22+
.h3 {
23+
font-size: 1.625rem; // expected 26px;
24+
line-height: 1.23;
25+
}
26+
27+
h4,
28+
.h4 {
29+
font-size: 1.375rem; // expected 22px;
30+
line-height: 1.33;
31+
}
32+
33+
h5,
34+
.h5 {
35+
font-size: 1.25rem; // expected 20px;
36+
line-height: 1.27;
37+
}
38+
39+
h6,
40+
.h6 {
41+
font-size: 1.125rem; // expected 18px;
42+
line-height: 1.40;
1743
}

sites/baseline/_heading.scss

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77
*
88
*/
99

10-
h1 {
11-
margin-bottom: .2em;
12-
margin-top: 1em;
13-
padding-bottom: .2em;
14-
}
15-
1610
// Common heading style
1711
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6
1812
{
@@ -28,8 +22,25 @@ h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6
2822
border: 0;
2923
}
3024

31-
// Heading font-sizes
32-
h6,
33-
.h6 {
34-
font-weight: 400;
25+
h1, .h1 {
26+
line-height: 1.17;
27+
margin-bottom: .2em;
28+
margin-top: 1em;
29+
padding-bottom: .2em;
30+
}
31+
32+
h2, .h2 {
33+
line-height: 1.23;
34+
}
35+
36+
h3, .h3 {
37+
line-height: 1.37;
38+
}
39+
40+
h4, .h4, h5, .h5 {
41+
line-height: 1.33;
42+
}
43+
44+
h6, .h6 {
45+
line-height: 1.45;
3546
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
*
3+
* Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
4+
* wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
5+
*
6+
* @title: Scaffolding
7+
*
8+
*/
9+
10+
main {
11+
font-size: 1.125rem;
12+
line-height: 1.55;
13+
}

sites/baseline/_scaffolding.scss

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,18 @@
1717
//
1818
html {
1919
-webkit-font-smoothing: antialiased;
20+
font-size: unset;
2021
text-rendering: optimizeLegibility;
2122
}
2223

24+
body {
25+
font-size: unset;
26+
}
27+
2328
// TODO: The font-size to be applied to the HTML element, not to the main element.
2429
main {
25-
font-size: 20px;
26-
line-height: 1.65em;
30+
font-size: 1.25rem;
31+
line-height: 1.6;
2732

2833
h1, h2, h3, h4, h5, h6, p {
2934
@extend %gcweb-scaffolding-word-break-break-word;
@@ -103,3 +108,11 @@ a.figcaption {
103108
}
104109

105110
}
111+
112+
output {
113+
font-size: 1em;
114+
}
115+
116+
blockquote {
117+
font-size: 1em;
118+
}

0 commit comments

Comments
 (0)