Skip to content

Please sync font weight names with Tailwindcss #753

@agafonovdmitry

Description

@agafonovdmitry

While trying to use only font weight names I noticed misalignment with TW. See https://tailwindcss.com/docs/font-weight for their list.

Currently used in @nuxt/fonts (and not documented?):

const weightMap = {
  100: "thin",
  200: "extra-light",
  300: "light",
  400: "normal",
  500: "medium",
  600: "semi-bold",
  700: "bold",
  800: "extra-bold",
  900: "black"
};

The defference is '-' not used in font weights in TW and elsewhere.

How I use it: the will is omit numeric weights, and the following is in my config:

weights: ['medium', 'semi-bold'],

but I have to use font-semibold in html classes and name my font files as Font-semi-bold.ttf which is confusing (with no docs for this case).

Update: it seems, named weights are not supported even if files are searched internally by name as well as by number...

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