Skip to content

Commit 169bb69

Browse files
authored
Rename CSS font variables. (#8534)
1 parent ca8f9cc commit 169bb69

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

pkg/web_css/lib/src/_base.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ body {
2323
}
2424

2525
body, input, button, select {
26-
font-family: var(--pub-default-text-font_family);
26+
font-family: var(--pub-font-family-body);
2727
-webkit-font-smoothing: antialiased;
2828
// we don't use font ligatures, and Google Sans fonts would otherwise change text in surprising ways
2929
font-variant-ligatures: none;
@@ -45,7 +45,7 @@ body,
4545
font-size: 16px;
4646

4747
h1, h2, h3, h4, h5, h6 {
48-
font-family: var(--pub-default-text-font_family);
48+
font-family: var(--pub-font-family-body);
4949
font-weight: 400;
5050
}
5151

@@ -177,7 +177,7 @@ code {
177177
background: var(--pub-inset-bgColor);
178178
border: none;
179179
border-radius: 4px;
180-
font-family: var(--pub-code-text-font_family);
180+
font-family: var(--pub-font-family-code);
181181
padding: 2px 4px;
182182
}
183183

@@ -279,7 +279,7 @@ pre {
279279
}
280280

281281
th {
282-
font-family: var(--pub-default-text-font_family);
282+
font-family: var(--pub-font-family-body);
283283
font-size: 16px;
284284
font-weight: 400; /* overrides github-markdown.css */
285285
border-bottom: 1px solid #c8c8ca;

pkg/web_css/lib/src/_detail_page.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ $detail-tabs-tablet-width: calc(100% - 240px);
8282
padding: 30px 0 20px;
8383

8484
.title {
85-
font-family: var(--pub-default-headline-font_family);
85+
font-family: var(--pub-font-family-headline);
8686
margin: 0;
8787
font-size: 24px;
8888

@@ -176,7 +176,7 @@ $detail-tabs-tablet-width: calc(100% - 240px);
176176
}
177177

178178
.detail-like {
179-
font-family: var(--pub-default-text-font_family);
179+
font-family: var(--pub-font-family-body);
180180
font-size: 16px;
181181
font-weight: 500;
182182
text-transform: uppercase;

pkg/web_css/lib/src/_list.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256

257257
.packages-recent {
258258
color: var(--pub-pkg_list_recent_item-text-color);
259-
font-family: var(--pub-default-text-font_family);
259+
font-family: var(--pub-font-family-body);
260260
font-size: 12px;
261261
margin: 0px 8px 0px 16px;
262262
white-space: nowrap;
@@ -409,7 +409,7 @@
409409
.search-form-section-header {
410410
display: flex;
411411
cursor: pointer;
412-
font-family: var(--pub-default-text-font_family);
412+
font-family: var(--pub-font-family-body);
413413
font-size: 14px;
414414
font-weight: bold;
415415

pkg/web_css/lib/src/_pkg.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
font-size: 14px;
112112

113113
.version {
114-
font-family: var(--pub-default-text-font_family);
114+
font-family: var(--pub-font-family-body);
115115
font-size: 24px;
116116
}
117117
}
@@ -152,7 +152,7 @@
152152
}
153153

154154
.score-key-figure-value {
155-
font-family: var(--pub-default-text-font_family);
155+
font-family: var(--pub-font-family-body);
156156
font-size: 32px;
157157
line-height: 1;
158158

@@ -162,13 +162,13 @@
162162
}
163163

164164
.score-key-figure-supplemental {
165-
font-family: var(--pub-default-text-font_family);
165+
font-family: var(--pub-font-family-body);
166166
font-size: 24px;
167167
}
168168

169169
.score-key-figure-label {
170170
color: var(--pub-score_label-text-color);
171-
font-family: var(--pub-default-text-font_family);
171+
font-family: var(--pub-font-family-body);
172172
font-size: 14px;
173173
text-align: center;
174174
text-transform: uppercase;
@@ -207,15 +207,15 @@
207207
}
208208

209209
.pkg-report-header-title {
210-
font-family: var(--pub-default-text-font_family);
210+
font-family: var(--pub-font-family-body);
211211
font-size: 24px;
212212
}
213213

214214
.pkg-report-header-score {
215215
display: flex;
216216
align-items: center;
217217

218-
font-family: var(--pub-default-text-font_family);
218+
font-family: var(--pub-font-family-body);
219219
font-size: 22px;
220220

221221
&.-is-red {
@@ -486,7 +486,7 @@
486486
transition: opacity variables.$copy-feedback-transition-opacity-delay;
487487

488488
>.code {
489-
font-family: var(--pub-code-text-font_family);
489+
font-family: var(--pub-font-family-code);
490490
display: block;
491491
}
492492

pkg/web_css/lib/src/_scores.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
display: flex;
99
align-items: center;
1010

11-
font-family: var(--pub-default-text-font_family);
11+
font-family: var(--pub-font-family-body);
1212

1313
&:hover {
1414
opacity: 1.0;

pkg/web_css/lib/src/_variables.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323

2424
/// Variables that are not specific to the light or dark theme.
2525
:root {
26-
--pub-default-headline-font_family: "Google Sans Display", "Google Sans", "Roboto", sans-serif;
27-
--pub-default-text-font_family: "Google Sans Text", "Google Sans", "Roboto", sans-serif;
28-
--pub-code-text-font_family: "Google Sans Mono", "Roboto Mono", "Source Code Pro", Menlo, "Bitstream Vera Sans Mono", "DejaVu Sans Mono", Monaco, Consolas, monospace;
26+
--pub-font-family-headline: "Google Sans Display", "Google Sans", "Roboto", sans-serif;
27+
--pub-font-family-body: "Google Sans Text", "Google Sans", "Roboto", sans-serif;
28+
--pub-font-family-code: "Google Sans Mono", "Roboto Mono", "Source Code Pro", Menlo, "Bitstream Vera Sans Mono", "DejaVu Sans Mono", Monaco, Consolas, monospace;
2929

3030
--pub-color-white: #ffffff;
3131
--pub-color-dangerRed: #ff4242;
@@ -78,7 +78,7 @@
7878
// Material Design theme customizations
7979
--mdc-theme-primary: #1967d2;
8080
--mdc-theme-secondary: #0066d9;
81-
--mdc-typography-font-family: var(--pub-default-text-font_family);
81+
--mdc-typography-font-family: var(--pub-font-family-body);
8282

8383
--pub-downloads-chart-color-0: var(--pub-markdown-alert-note);
8484
--pub-downloads-chart-color-bg-0: rgb(9, 105, 218, 0.3);

0 commit comments

Comments
 (0)