Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

feat(FontWeight): Add Font Weight to Tailwind Config #77

Open
wants to merge 2 commits into
base: next
Choose a base branch
from

Conversation

deniaz
Copy link
Contributor

@deniaz deniaz commented Mar 17, 2022

No description provided.

@thisguyscode
Copy link
Contributor

@deniaz - Sorry I'm not sure how best to test this, but looking at the output tailwind config I wonder if the generated tailwind classes would be identical for the default font-weights and font-families. The default config would generate tw-font-sans and tw-font-regular for example, but as we use the word body for both I wonder if there's a conflict.

fontFamily: {
    body: "var(--body-family)",
    ...
    code: "var(--code-family)",
    ...
    heading: "var(--heading-family)",
    ...
},
fontWeight: {
    body: "400",
    ...
    code: "400",
    ...
    heading: "500",
    ...
},

1 similar comment
@thisguyscode
Copy link
Contributor

@deniaz - Sorry I'm not sure how best to test this, but looking at the output tailwind config I wonder if the generated tailwind classes would be identical for the default font-weights and font-families. The default config would generate tw-font-sans and tw-font-regular for example, but as we use the word body for both I wonder if there's a conflict.

fontFamily: {
    body: "var(--body-family)",
    ...
    code: "var(--code-family)",
    ...
    heading: "var(--heading-family)",
    ...
},
fontWeight: {
    body: "400",
    ...
    code: "400",
    ...
    heading: "500",
    ...
},

@jonasbuechel
Copy link

jonasbuechel commented Apr 27, 2022

Yes, they're in conflict. I double-checked with the debug option we now have.

.tw-font-body {
  font-family: var(--body-family);
}

.tw-font-body {
  font-weight: 400;
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants