bricks icon indicating copy to clipboard operation
bricks copied to clipboard

Sweep: Support Figma SMALL_CAPS and SMALL_CAPS_FORCED textCase

Open donfour opened this issue 2 years ago • 1 comments

This can be implemented with the CSS font-variant-caps property...

Will need to change:

  1. getStyledTextSegments() in core/src/design/adapter/figma/adapter.ts
  2. getCssAttributes() in core/src/design/adapter/figma/adapter.ts

donfour avatar May 05 '23 21:05 donfour

80%


❌ Unable to Complete PR

I'm sorry, but it looks like an error has occurred. Try changing the issue description to re-trigger Sweep. If this error persists contact [email protected].

For bonus GPT-4 tickets, please report this bug on Discord.


Please look at the generated plan. If something looks wrong, please add more details to your issue.

File Path Proposed Changes
core/src/design/adapter/figma/adapter.ts - In the getStyledTextSegments() function, add a case for SMALL_CAPS and SMALL_CAPS_FORCED in the switch statement for textCase. Map these cases to the small-caps value.
- In the getCssAttributes() function, add a case for text-transform in the switch statement. If the textCase is SMALL_CAPS or SMALL_CAPS_FORCED, set the font-variant-caps CSS property to small-caps.

To recreate the pull request, leave a comment prefixed with "sweep:" or edit the issue.