Skip to content

Conversation

@gadenbuie
Copy link
Collaborator

Small change to deduplicate font imports. Prior to this change, a brand like

typography:
  fonts:
    - family: IBM Plex Mono
      source: google

  monospace:
    family: IBM Plex Mono
  monospace-inline:
    family: IBM Plex Mono
  monospace-block:
    family: IBM Plex Mono

Would result in three @import statements for "IBM Plex Mono"

@import"https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap";
@import"https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap";
@import"https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap";

After this PR, identical imports are dropped:

@import"https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap";

@gadenbuie gadenbuie requested a review from cscheid October 18, 2024 15:04
Copy link
Collaborator

@cscheid cscheid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks.

@cscheid cscheid merged commit 9d866bd into main Oct 18, 2024
47 checks passed
@cscheid cscheid deleted the brand/dedupe-font-imports branch October 18, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants