Skip to content

Conversation

@andrewmilligan
Copy link

The styleProps generator was converting Figma's TextCase values to CSS by lowercasing values other than ORIGINAL, resulting in invalid CSS values for text-transform like upper (rather than uppercase). This fixes that conversion by adding a utility function to properly map TextCase values to CSS values.

Find a simple reproduction here. This is a proposed fix for #113

The `styleProps` generator was converting [Figma's `TextCase`
values](https://www.figma.com/plugin-docs/api/TextCase/) to
CSS by lowercasing values other than `ORIGINAL`, resulting in invalid
CSS values like `upper` (rather than `uppercase`). This fixes that
conversion by adding a utility function to properly map `TextCase`
values to CSS values.
@changeset-bot
Copy link

changeset-bot bot commented Aug 4, 2024

⚠️ No Changeset found

Latest commit: bab2845

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@andrewmilligan
Copy link
Author

I wrote this up as I was investigating what was causing #113 so I figured I would just put it in and if it's helpful, great! I'm happy to make any tweaks you'd like or for you to take it over and do what you will with it. Hope this isn't an annoyance to you all. Love the plugin — we're in the process of trying to adopt it more systematically on my team ❤️

@sawyerclick
Copy link
Contributor

I'm glad to hear its getting use, and thanks for the contribution! I'll check this PR out in the coming days.

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.

2 participants