jan-dh / figma-tailwindcss

A plugin that tries to bridge the gap between designs and code. Figma tailwindcss lets you export aspects of a design made in Figma to a javascript theme file that you can import into your tailwindcss config
174 stars 16 forks source link

[BUG] xs font size not exported correctly #24

Closed ErikFontanel closed 3 years ago

ErikFontanel commented 3 years ago

Description

The export preview of font sizes looks like this: image

With 2xs and xs being huge. And the corresponding json that is generated:

 "fontSize": {
  "2xs": "0.75rem",
  "xs": "8rem",
  "sm": "0.875rem",
  "base": "1rem",
  "lg": "1.125rem",
  "xl": "1.25rem",
  "2xl": "1.5rem",
  "3xl": "1.875rem",
  "4xl": "2.25rem",
  "5xl": "3rem",
  "6xl": "3.75rem",
  "7xl": "4.5rem",
  "8xl": "6rem"
 },

Despite the preview being wrong, the json for 2xs is correct. But note the wrong font size for xs, it's missing 0..

Steps to reproduce

  1. Launch the plugin
  2. Choose a base font size

Additional info

jan-dh commented 3 years ago

@ErikFontanel would it be possible to share your Figma file? Can't reproduce this

ErikFontanel commented 3 years ago

I've created a reduced test case. It's an empty file except I copied over all the text styles from the file that caused this and I'm able to reproduce the issue.

jan-dh commented 3 years ago

Fixed in latest release