Skip to content

Not loading "Bree Serif" #112

Open
Open

Description

@robinelvin

I have this config:

        pfm({
          variants: {
            Raleway: { 300: [], 500: [] },
            "Bree Serif": { 400: [] },
          },
          foundries: ["google"],
        }),

And my tailwindcss theme is:

@theme {
    --font-sans: "Raleway", sans-serif;
    --font-serif: "Bree Serif", serif;
}

But I am only getting Raleway in my CSS. I have checked my HTML and it is correctly referencing the font:

Image

Activity

  1. robinelvin commented on Apr 2, 2025

    @robinelvin
    Author

    I have found the issue. It is not enough to reference the font family in a variable - it needs to be added to a CSS class. I experimented with other fonts and they wouldn't load either but I did see that Raleway always loaded. Searching my codebase I found a single reference to Raleway in a CSS file. So adding the following to my CSS caused Bree Serif to be loaded:

    .bogus {
        font-family: "Bree Serif";
    }

    It was not enough to just reference in the @theme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions