Skip to content

Commit cd7841f

Browse files
author
Adam Butterworth
authored
feat: update typography and button focus states (#49)
* feat: updated type sizes * fix: update to button focus rings
1 parent ae06020 commit cd7841f

File tree

3 files changed

+46
-18
lines changed

3 files changed

+46
-18
lines changed

scss/edx/_variables.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,9 @@ $h5-font-size: $font-size-base * 1.25 !default;
330330
$h6-font-size: $font-size-base !default;
331331

332332
$headings-margin-bottom: $spacer / 2 !default;
333-
$headings-font-family: $font-family-serif !default;
333+
$headings-font-family: $font-family-sans-serif !default;
334334
$headings-font-weight: $font-weight-bold !default;
335-
$headings-line-height: 1.2 !default;
335+
$headings-line-height: 1.25 !default;
336336
$headings-color: inherit !default;
337337

338338
$display1-size: 6rem !default;
@@ -349,7 +349,7 @@ $display-line-height: $headings-line-height !default;
349349
$lead-font-size: ($font-size-base * 1.25) !default;
350350
$lead-font-weight: $font-weight-base !default;
351351

352-
$small-font-size: 80% !default;
352+
$small-font-size: 87.5% !default;
353353

354354
$text-muted: $gray-600 !default;
355355

scss/edx/overrides/_buttons.scss

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,18 @@
3131
&.active {
3232
&.focus,
3333
&:focus {
34+
position: relative;
35+
&:before {
36+
content: '';
37+
position: absolute;
38+
top: -6px;
39+
left: -6px;
40+
bottom: -6px;
41+
right: -6px;
42+
border:solid 2px rgba(35,65, 159, .75);
43+
border-radius: 40rem;
44+
}
3445
box-shadow: none;
35-
outline: 1px dotted;
36-
outline: 5px auto -webkit-focus-ring-color;
3746
}
3847
}
3948
}
@@ -65,9 +74,18 @@
6574
color: darken($value, 10%);
6675
background: desaturate(blend-transparent($value, white, 0.065), 5%);
6776
}
68-
&:focus,
69-
&.focus {
70-
border-color: transparent;
77+
&:not(:disabled):not(.disabled),
78+
&:not(:disabled):not(.disabled):active,
79+
&:not(:disabled):not(.disabled).active,
80+
&:active,
81+
&.active {
82+
&:focus,
83+
&.focus {
84+
border-color: transparent;
85+
&:before {
86+
border:solid 2px rgba(white, .75);
87+
}
88+
}
7189
}
7290
}
7391
}

scss/edx/overrides/_typography.scss

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,36 @@ body {
66
.display-1,
77
.display-2,
88
.display-3,
9-
.display-4,
9+
.display-4 {
10+
font-family: $font-family-serif;
11+
font-weight: $font-weight-bold;
12+
line-height: 1.111111111111111; // 80px
13+
}
14+
1015
h1,
1116
.h1 {
12-
letter-spacing: -0.025em;
17+
font-family: $font-family-serif;
18+
font-weight: $font-weight-bold;
1319
}
1420

1521
h2,
16-
.h2 {
17-
font-weight: $font-weight-normal;
18-
letter-spacing: -0.0125em;
19-
}
20-
2122
h3,
2223
h4,
24+
.h2,
25+
.h3,
26+
.h4, {
27+
font-weight: $font-weight-semi-bold;
28+
}
29+
2330
h5,
2431
h6,
25-
.h3,
26-
.h4,
2732
.h5,
2833
.h6 {
29-
font-family: $font-family-sans-serif;
34+
font-weight: $font-weight-bold;
3035
}
3136

37+
38+
small,
39+
.small {
40+
line-height: 1.428571428571429; // 20px
41+
}

0 commit comments

Comments
 (0)