Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

[@mantine/vanilla-extract] theme-to-vars: Fix headings' vars #58

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

soudai-s
Copy link
Contributor

@soudai-s soudai-s commented Sep 11, 2023

Generated CSS Variables about headings by theme-to-vars were unintended values are follows
Because the keys of mergedTheme.headings are not h1 ~ h6, but fontFamily, fontWeight, sizes.

{
  fontFamily: {
    fontSize: 'var(--mantine-fontFamily-font-size)',
    lineHeight: 'var(--mantine-fontFamily-line-height)',
    fontWeight: 'var(--mantine-fontFamily-font-weight)'
  },
  fontWeight: {
    fontSize: 'var(--mantine-fontWeight-font-size)',
    lineHeight: 'var(--mantine-fontWeight-line-height)',
    fontWeight: 'var(--mantine-fontWeight-font-weight)'
  },
  sizes: {
    fontSize: 'var(--mantine-sizes-font-size)',
    lineHeight: 'var(--mantine-sizes-line-height)',
    fontWeight: 'var(--mantine-sizes-font-weight)'
  }
},
{
  fontFamily: {
    fontSize: 'var(--mantine-fontFamily-font-size)',
    lineHeight: 'var(--mantine-fontFamily-line-height)',
    fontWeight: 'var(--mantine-fontFamily-font-weight)'
  },
  fontWeight: {
    fontSize: 'var(--mantine-fontWeight-font-size)',
    lineHeight: 'var(--mantine-fontWeight-line-height)',
    fontWeight: 'var(--mantine-fontWeight-font-weight)'
  },
  sizes: {
    fontSize: 'var(--mantine-sizes-font-size)',
    lineHeight: 'var(--mantine-sizes-line-height)',
    fontWeight: 'var(--mantine-sizes-font-weight)'
  }
},
{
  fontFamily: {
    fontSize: 'var(--mantine-fontFamily-font-size)',
    lineHeight: 'var(--mantine-fontFamily-line-height)',
    fontWeight: 'var(--mantine-fontFamily-font-weight)'
  },
  fontWeight: {
    fontSize: 'var(--mantine-fontWeight-font-size)',
    lineHeight: 'var(--mantine-fontWeight-line-height)',
    fontWeight: 'var(--mantine-fontWeight-font-weight)'
  },
  sizes: {
    fontSize: 'var(--mantine-sizes-font-size)',
    lineHeight: 'var(--mantine-sizes-line-height)',
    fontWeight: 'var(--mantine-sizes-font-weight)'
  }
}

So I have fixed this problem.

@rtivital rtivital merged commit e20c770 into rtivital:master Sep 11, 2023
@rtivital
Copy link
Owner

Thanks!

@soudai-s soudai-s deleted the fix-theme-to-vars branch September 12, 2023 02:48
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.

2 participants