shakurocom / figma-extractor

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

Merge text styles #20

Closed chdg61 closed 1 year ago

chdg61 commented 1 year ago

Ability to merge text styles by the name's suffix. Each suffix is one of the defined screen sizes in advance.

As result, styles like:

- heading/h500 - bs
- heading/h500 - sm
- heading/h500 - md
- heading/h500 - lg

will be transformed:

heading/h500: {
   fontSize: ...,
   fontWeight: ...,
   ...,
   '@media (min-width: 600): {
     fontSize: ...,
     ...,
   },
   '@media (min-width: 900): {
     ...,
   },
   '@media (min-width: 1200): {
     ...,
   },
 }

Where the screen sizes have already been defined, like that:

screen: {
  bs: 0,
  sm: 600,
  md: 900,
  lg: 1200
 }

And bs is the base screen (I mean the screen by default)

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 2, 2022 at 11:20AM (UTC)