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

Allow grabbing theme values with a decimal #815

Merged
merged 1 commit into from Jul 23, 2023

Conversation

ben-rogerson
Copy link
Owner

@ben-rogerson ben-rogerson commented Jul 12, 2023

This PR contains a fix for spacing theme values containing a decimal, like this:

tw`pl-[calc(20px + theme(spacing.2.5))]`

// ↓ ↓ ↓ ↓ ↓ ↓

({
  "paddingLeft": "calc(20px + 0.625rem)"
});

Previously values like this would return an incorrect value.
This made square brackets required to select these type of values:

tw`pl-[calc(20px + theme(spacing[2.5]))]`

Related #814

@ben-rogerson ben-rogerson merged commit 8668bf2 into master Jul 23, 2023
@ben-rogerson ben-rogerson deleted the bugfix/allow-decimal-theme-values-for-spacing branch July 23, 2023 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant