-
-
Notifications
You must be signed in to change notification settings - Fork 75
Closed
Description
import cssstyle from "cssstyle";
export const stringifyCssText = (styleObject: object): string => {
let cssText = "";
const style = new cssstyle.CSSStyleDeclaration(newCssText => {
cssText = newCssText;
});
Object.assign(style, styleObject);
return cssText;
};
console.log(
stringifyCssText({
width: "100vh",
height: "calc(100vh * 2)"
})
);
// will output `width: 100vh;` but `height` is missing
Metadata
Metadata
Assignees
Labels
No labels