shakurocom / figma-extractor

https://figma-extractor.vercel.app
MIT License
22 stars 5 forks source link

[BUG] Fix wrong generated media queries #21

Closed chdg61 closed 1 year ago

chdg61 commented 1 year ago

Hello.

The last release has a mistake in the generation of media queries. It generates media queries without px. And, as result, the generated file with test styles has typography like that:

'.v-500': {
    fontFamily: fontFamily.font3,
    fontSize: 28,
    fontWeight: 500,
    textTransform: 'uppercase',
    lineHeight: 1.4,
    '@media (min-width: 600)': {
      fontFamily: fontFamily.font3,
      fontSize: 32,
      fontWeight: 500,
      textTransform: 'uppercase',
      lineHeight: 1.4,
    },
    '@media (min-width: 900)': {
      fontFamily: fontFamily.font3,
      fontSize: 40,
      fontWeight: 500,
      textTransform: 'uppercase',
      lineHeight: 1.4,
    },
    '@media (min-width: 1280)': {
      fontFamily: fontFamily.font3,
      fontSize: 48,
      fontWeight: 500,
      textTransform: 'uppercase',
      lineHeight: 1.4,
    },
  },

All media queries must look like this:

  '@media (min-width: 600px)': {
...
    },
    '@media (min-width: 900px)': {
...
    },
    '@media (min-width: 1280px)': {
...
    },

This PR fixes it.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
figma-extractor ❌ Failed (Inspect) Dec 14, 2022 at 2:46PM (UTC)