1.0.6 • Published 2 years ago

ff-style v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

FF-Style

Format Figma Style to CSS-IN-JS

Before

color: var(--Theme, #FF8F34);
text-align: center;
font-family: PingFang SC;
font-size: 12px;
font-style: normal;
font-weight: 600;
line-height: 16px; /* 133.333% */

After

color: "var(--Theme, #FF8F34)",
textAlign: "center",
fontFamily: "PingFang SC",
fontSize: "12px",
fontStyle: "normal",
fontWeight: "600",
lineHeight: "16px", 

Features

  • Camel-Case to key
  • Quotation mark to value
  • Replace semicolon with comma
  • Remove comments
  • Ignore braces

Installation

To run ffs, you should install this package globally:

$ sudo npm i -g ff-style

Usage

  1. Copy CSS in Figma and paste in fileToFormat.
  2. Make sure you have installed ff-style globally.
  3. Run the command below:
ffs ./fileToFormat
1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago