Skip to content

fontFamily extension not working #183

Open
@qucode1

Description

Describe the bug
Extending the fontFamily in windicss config does not work.
The expected classes are not generated at all or incorrectly.

The font-family does not show up in the class, only the font-weight. Using font-roboto-regular does not have any styles at all.

I have described the issue a while ago in the windicss repo, but it is still a problem with these package versions:

...
nuxt-windicss 2.5.2
nuxt3 3.0.0-rc.10
typescript 4.8.3
vite 3.1.2
vue 3.2.39
webpack 5.74.0
...

To Reproduce
Steps to reproduce the behavior:

  1. Add fonts to assets
  2. Add fonts.css with @font-face rules
  3. Extend windi config
  theme: {
    extend: {
      fontFamily: {
        'roboto-regular': ['Roboto Regular', 'sans-serif'],
        'roboto-light': ['Roboto Light', 'sans-serif'],
        'roboto-bold': ['Roboto Bold', 'sans-serif'],
      }
    }
  },
  1. Try to use font family classes, e.g. font-roboto-regular

Expected behavior
Font classes should have been generated correctly and available to use.

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