Stylesheet
Create inline styles in JS/TS with Protection Levels.
Pages
- Classes:
InlineStyle,StyleSheet
Quick Start
ts
import { InlineStyle, StyleSheet } from "@briklab/lib/stylesheet";
const style = new InlineStyle({ color: "red", fontSize: "16px" }, "boundary");
style.addStyleWithObject({ backgroundColor: "blue" }).removeStyle("fontSize").applyTo(document.getElementById("myElement"));
const sheet = new StyleSheet();
sheet.set(".title", new InlineStyle({ fontWeight: "bold" }));
console.log(sheet.generate());