Skip to content

Commit

Permalink
Merge pull request #1238 from primer/tobiasahlin/move-font-face-out-f…
Browse files Browse the repository at this point in the history
…rom-vars

Move marketing @font-face declarations from vars to type
  • Loading branch information
simurai committed Mar 11, 2021
2 parents 914f4ba + 13c49b6 commit 74c5442
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 26 deletions.
25 changes: 0 additions & 25 deletions src/marketing/support/variables.scss
Original file line number Diff line number Diff line change
@@ -1,30 +1,5 @@
$marketing-font-path: "/fonts/" !default;

// Type
@font-face {
font-family: Inter;
font-style: normal;
font-weight: $font-weight-normal;
src: local("Inter"), local("Inter-Regular"), url("#{$marketing-font-path}Inter-Regular.woff") format("woff");
font-display: swap;
}

@font-face {
font-family: Inter;
font-style: normal;
font-weight: $font-weight-semibold;
src: local("Inter Medium"), local("Inter-Medium"), url("#{$marketing-font-path}Inter-Medium.woff") format("woff");
font-display: swap;
}

@font-face {
font-family: Inter;
font-style: normal;
font-weight: $font-weight-bold;
src: local("Inter Bold"), local("Inter-Bold"), url("#{$marketing-font-path}Inter-Bold.woff") format("woff");
font-display: swap;
}

$font-mktg: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;

// Builds upon @primer/css/support/variables/typography.scss
Expand Down
26 changes: 25 additions & 1 deletion src/marketing/type/typography.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
// Headings
// Type
@font-face {
font-family: Inter;
font-style: normal;
font-weight: $font-weight-normal;
src: local("Inter"), local("Inter-Regular"), url("#{$marketing-font-path}Inter-Regular.woff") format("woff");
font-display: swap;
}

@font-face {
font-family: Inter;
font-style: normal;
font-weight: $font-weight-semibold;
src: local("Inter Medium"), local("Inter-Medium"), url("#{$marketing-font-path}Inter-Medium.woff") format("woff");
font-display: swap;
}

@font-face {
font-family: Inter;
font-style: normal;
font-weight: $font-weight-bold;
src: local("Inter Bold"), local("Inter-Bold"), url("#{$marketing-font-path}Inter-Bold.woff") format("woff");
font-display: swap;
}

// Headings
.h000-mktg,
.h00-mktg,
.h0-mktg,
Expand Down

0 comments on commit 74c5442

Please sign in to comment.