Skip to content

Commit ebbc267

Browse files
author
Stephanie Hobson
committed
review fixes
1 parent 1769bda commit ebbc267

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed

assets/sass/protocol/includes/mixins/_typography.scss

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
@use 'sass:math';
66
@use 'sass:meta';
7-
@use '../tokens';
8-
@use '../themes-sass' as themes;
9-
@use '../functions';
10-
7+
@use '../themes-sass' as *;
8+
@use '../functions' as functions;
9+
@use '../tokens' as tokens;
1110

1211
// * -------------------------------------------------------------------------- */
1312
// Font families
@@ -30,15 +29,15 @@
3029
// * -------------------------------------------------------------------------- */
3130
// A mixin to output font-size in rems.
3231
// Declare sizes in pixels for ease and clarity, the mixin does the math.
33-
// Requires: remify() - defined in includes/themes.scss.
32+
// Requires: remify() - defined in includes/functions.scss.
3433
// Usage:
3534
// .foo { @include font-size(24px); }
3635

3736
@mixin font-size($size) {
3837
// When unit is pixels, pass it through and convert to rem
3938

4039
@if math.unit($size) == 'px' {
41-
font-size: $size;
40+
font-size: functions.remify($size);
4241
}
4342

4443
// When unit is not pixels, show an error

assets/sass/protocol/includes/themes/_firefox.scss

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
}
3535

3636
%firefox-type-scale {
37-
// typescale
37+
// title
3838
--title-2xl-size: 3.5rem;
3939
--title-2xl-line-height: 1.143;
4040
--title-xl-size: 3rem;
@@ -51,6 +51,8 @@
5151
--title-2xs-line-height: 1.25;
5252
--title-3xs-size: 1rem;
5353
--title-3xs-line-height: 1.25;
54+
55+
// body
5456
--body-xl-size: 1.125rem;
5557
--body-lg-size: 1rem;
5658
--body-md-size: 0.875rem;
@@ -59,6 +61,7 @@
5961
--body-line-height: 1.5;
6062

6163
@media #{tokens.$mq-md} {
64+
// title
6265
--title-2xl-size: 4rem;
6366
--title-2xl-line-height: 1.125;
6467
--title-xl-size: 3.5rem;
@@ -75,16 +78,18 @@
7578
--title-2xs-line-height: 1.2;
7679
--title-3xs-size: 1rem;
7780
--title-3xs-line-height: 1.25;
81+
82+
// body
7883
--body-xl-size: 1.313rem;
7984
--body-lg-size: 1.125rem;
8085
--body-md-size: 1rem;
8186
--body-sm-size: 0.875rem;
8287
--body-xs-size: 0.75rem;
83-
--body-line-height: 1.5;
8488
}
8589
}
8690

8791
%firefox-type-scale-condensed {
92+
// title
8893
--title-2xl-size: 1.5rem;
8994
--title-2xl-line-height: 1.166;
9095
--title-xl-size: 1.313rem;
@@ -101,6 +106,8 @@
101106
--title-2xs-line-height: 1.25;
102107
--title-3xs-size: 0.875rem;
103108
--title-3xs-line-height: 1.25;
109+
110+
// body
104111
--body-xl-size: 1rem;
105112
--body-lg-size: 0.875rem;
106113
--body-md-size: 0.8rem;
@@ -109,6 +116,7 @@
109116
--body-line-height: 1.5;
110117

111118
@media #{tokens.$mq-md} {
119+
// title
112120
--title-2xl-size: 2rem;
113121
--title-2xl-line-height: 1.125;
114122
--title-xl-size: 1.5rem;
@@ -125,11 +133,12 @@
125133
--title-2xs-line-height: 1.25;
126134
--title-3xs-size: 0.875rem;
127135
--title-3xs-line-height: 1.25;
136+
137+
// body
128138
--body-xl-size: 1.125rem;
129139
--body-lg-size: 1rem;
130140
--body-md-size: 0.875rem;
131141
--body-sm-size: 0.8rem;
132142
--body-xs-size: 0.688rem;
133-
--body-line-height: 1.5;
134143
}
135144
}

assets/sass/protocol/includes/themes/_mozilla.scss

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
}
4040

4141
%mozilla-type-scale {
42-
// type scale
42+
// title
4343
--title-2xl-size: 4.125rem;
4444
--title-2xl-line-height: 1.1;
4545
--title-xl-size: 3.5rem;
@@ -56,6 +56,8 @@
5656
--title-2xs-line-height: 1.1;
5757
--title-3xs-size: 1.125rem;
5858
--title-3xs-line-height: 1.1;
59+
60+
// body
5961
--body-xl-size: 1.125rem;
6062
--body-lg-size: 1rem;
6163
--body-md-size: 0.875rem;
@@ -64,32 +66,27 @@
6466
--body-line-height: 1.2;
6567

6668
@media #{tokens.$mq-md} {
69+
// title
6770
--title-2xl-size: 4.75rem;
68-
--title-2xl-line-height: 1.1;
6971
--title-xl-size: 4.125rem;
70-
--title-xl-line-height: 1.1;
7172
--title-lg-size: 3.5rem;
72-
--title-lg-line-height: 1.1;
7373
--title-md-size: 3rem;
74-
--title-md-line-height: 1.1;
7574
--title-sm-size: 2.375rem;
76-
--title-sm-line-height: 1.1;
7775
--title-xs-size: 1.75rem;
78-
--title-xs-line-height: 1.1;
7976
--title-2xs-size: 1.5rem;
80-
--title-2xs-line-height: 1.1;
8177
--title-3xs-size: 1.125rem;
82-
--title-3xs-line-height: 1.1;
78+
79+
// body
8380
--body-xl-size: 1.313rem;
8481
--body-lg-size: 1.125rem;
8582
--body-md-size: 1rem;
8683
--body-sm-size: 0.875rem;
8784
--body-xs-size: 0.75rem;
88-
// --body-line-height: 1.2; doesn't change, no need to update
8985
}
9086
}
9187

9288
%mozilla-type-scale-condensed {
89+
// title
9390
--title-2xl-size: 1.625rem;
9491
--title-2xl-line-height: 1;
9592
--title-xl-size: 1.375rem;
@@ -107,6 +104,7 @@
107104
--title-3xs-size: 0.875rem;
108105
--title-3xs-line-height: 1;
109106

107+
// body
110108
--body-xl-size: 1rem;
111109
--body-lg-size: 0.875rem;
112110
--body-md-size: 0.75rem;
@@ -115,27 +113,21 @@
115113
--body-line-height: 1.2;
116114

117115
@media #{tokens.$mq-md} {
116+
// title
118117
--title-2xl-size: 2.125rem;
119-
--title-2xl-line-height: 1;
120118
--title-xl-size: 1.625rem;
121-
--title-xl-line-height: 1;
122119
--title-lg-size: 1.375rem;
123-
--title-lg-line-height: 1;
124120
--title-md-size: 1.25rem;
125-
--title-md-line-height: 1;
126121
--title-sm-size: 1.125rem;
127-
--title-sm-line-height: 1;
128122
--title-xs-size: 1rem;
129-
--title-xs-line-height: 1;
130123
--title-2xs-size: 0.875rem;
131-
--title-2xs-line-height: 1;
132124
--title-3xs-size: 0.875rem;
133-
--title-3xs-line-height: 1;
125+
126+
// body
134127
--body-xl-size: 1.125rem;
135128
--body-lg-size: 1rem;
136129
--body-md-size: 0.875rem;
137130
--body-sm-size: 0.75rem;
138131
--body-xs-size: 0.688rem;
139-
// --body-line-height: 1.5; doesn't change, no need to update
140132
}
141133
}

0 commit comments

Comments
 (0)