figma2html icon indicating copy to clipboard operation
figma2html copied to clipboard

[fix] text-transform CSS from Figma TextCase

Open andrewmilligan opened this issue 1 year ago • 3 comments

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 https://github.com/the-dataface/figma2html/issues/113

andrewmilligan avatar Aug 04 '24 13:08 andrewmilligan

⚠️ No Changeset found

Latest commit: bab2845e3654ec648ad2e0195b436c92e09105bb

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

changeset-bot[bot] avatar Aug 04 '24 13:08 changeset-bot[bot]

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 ❤️

andrewmilligan avatar Aug 04 '24 14:08 andrewmilligan

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

sawyerclick avatar Aug 05 '24 03:08 sawyerclick