Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default theme uses singleton instance of themeOptions #636

Open
chanceaclark opened this issue Oct 13, 2021 · 0 comments
Open

Default theme uses singleton instance of themeOptions #636

chanceaclark opened this issue Oct 13, 2021 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@chanceaclark
Copy link
Contributor

Describe the bug
@bigcommerce/big-design-theme uses singleton instance of themeOptions. This can cause issues if we want to create two separate themes with different font-sizes.

To Reproduce
Codesandbox to replicate the issue:
https://codesandbox.io/s/delicate-thunder-7ih0r?file=/src/index.tsx

The first box in the codesandbox is being remCalc'd to 48px but you can see the calculation is using the 14px font-size for the calculation.

Expected behavior
Each theme should have it's own instance of themeOptions to ensure font-sizes and potential future options don't clash with another themes.

Screenshots
N/A

Desktop (please complete the following information, if applicable):
N/A

Smartphone (please complete the following information, if applicable):
N/A

Additional context
N/A

@chanceaclark chanceaclark added bug Something isn't working good first issue Good for newcomers labels Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Development

No branches or pull requests

1 participant