Skip to content

Commit

Permalink
Rename CSS font variables. (#8534)
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos authored Feb 7, 2025
1 parent ca8f9cc commit 169bb69
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions pkg/web_css/lib/src/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ body {
}

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

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

Expand Down Expand Up @@ -177,7 +177,7 @@ code {
background: var(--pub-inset-bgColor);
border: none;
border-radius: 4px;
font-family: var(--pub-code-text-font_family);
font-family: var(--pub-font-family-code);
padding: 2px 4px;
}

Expand Down Expand Up @@ -279,7 +279,7 @@ pre {
}

th {
font-family: var(--pub-default-text-font_family);
font-family: var(--pub-font-family-body);
font-size: 16px;
font-weight: 400; /* overrides github-markdown.css */
border-bottom: 1px solid #c8c8ca;
Expand Down
4 changes: 2 additions & 2 deletions pkg/web_css/lib/src/_detail_page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ $detail-tabs-tablet-width: calc(100% - 240px);
padding: 30px 0 20px;

.title {
font-family: var(--pub-default-headline-font_family);
font-family: var(--pub-font-family-headline);
margin: 0;
font-size: 24px;

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

.detail-like {
font-family: var(--pub-default-text-font_family);
font-family: var(--pub-font-family-body);
font-size: 16px;
font-weight: 500;
text-transform: uppercase;
Expand Down
4 changes: 2 additions & 2 deletions pkg/web_css/lib/src/_list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@

.packages-recent {
color: var(--pub-pkg_list_recent_item-text-color);
font-family: var(--pub-default-text-font_family);
font-family: var(--pub-font-family-body);
font-size: 12px;
margin: 0px 8px 0px 16px;
white-space: nowrap;
Expand Down Expand Up @@ -409,7 +409,7 @@
.search-form-section-header {
display: flex;
cursor: pointer;
font-family: var(--pub-default-text-font_family);
font-family: var(--pub-font-family-body);
font-size: 14px;
font-weight: bold;

Expand Down
14 changes: 7 additions & 7 deletions pkg/web_css/lib/src/_pkg.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
font-size: 14px;

.version {
font-family: var(--pub-default-text-font_family);
font-family: var(--pub-font-family-body);
font-size: 24px;
}
}
Expand Down Expand Up @@ -152,7 +152,7 @@
}

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

Expand All @@ -162,13 +162,13 @@
}

.score-key-figure-supplemental {
font-family: var(--pub-default-text-font_family);
font-family: var(--pub-font-family-body);
font-size: 24px;
}

.score-key-figure-label {
color: var(--pub-score_label-text-color);
font-family: var(--pub-default-text-font_family);
font-family: var(--pub-font-family-body);
font-size: 14px;
text-align: center;
text-transform: uppercase;
Expand Down Expand Up @@ -207,15 +207,15 @@
}

.pkg-report-header-title {
font-family: var(--pub-default-text-font_family);
font-family: var(--pub-font-family-body);
font-size: 24px;
}

.pkg-report-header-score {
display: flex;
align-items: center;

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

&.-is-red {
Expand Down Expand Up @@ -486,7 +486,7 @@
transition: opacity variables.$copy-feedback-transition-opacity-delay;

>.code {
font-family: var(--pub-code-text-font_family);
font-family: var(--pub-font-family-code);
display: block;
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/web_css/lib/src/_scores.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
display: flex;
align-items: center;

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

&:hover {
opacity: 1.0;
Expand Down
8 changes: 4 additions & 4 deletions pkg/web_css/lib/src/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@

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

--pub-color-white: #ffffff;
--pub-color-dangerRed: #ff4242;
Expand Down Expand Up @@ -78,7 +78,7 @@
// Material Design theme customizations
--mdc-theme-primary: #1967d2;
--mdc-theme-secondary: #0066d9;
--mdc-typography-font-family: var(--pub-default-text-font_family);
--mdc-typography-font-family: var(--pub-font-family-body);

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

0 comments on commit 169bb69

Please sign in to comment.