ff-style
v1.0.6
Published
Format Figma Style to CSS-IN-JS
Downloads
8
Maintainers
Readme
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
- Copy CSS in Figma and paste in fileToFormat.
- Make sure you have installed ff-style globally.
- Run the command below:
ffs ./fileToFormat