px2code / Figma-to-HTML

Figma to HTML/React/Vue and truly responsive
https://www.pxcode.io/figma-convert-to-html-plugin
36 stars 6 forks source link

How can I add style to <body/> on pxcode.io? #2

Closed ISimionEndava closed 2 years ago

ISimionEndava commented 2 years ago

Trying to edit the styles on pxCode, but I can not see any feature helping me to do not, nor any documentation about it.

px2code commented 2 years ago

It's supported in pxCode to add custom CSS styles to each item at the navigator. But there is no tag at the navigator because the is shared among all screens and components.

We do have a workaround way to do that. You can go to project view and click Font Settings at the top, and switch to CSS Font Face tab

The tab will export as fonts.css so that you can add any CSS code there, such as

body {
    opacity: 0.5;
}

We have used this way many times in our internal projects, and it works!

ISimionEndava commented 2 years ago

Cool, thank you.