1.0.0-alpha.0 • Published 7 months ago
powerstyl v1.0.0-alpha.0
powerstyl
Style with template strings.
Inspired by a widely used package?
npm i powerstyl
import { createScoped } from "powerstyl";
const div = createScoped<HTMLDivElement>`div``color: red;`;
div();
class MyElement extends HTMLElement {}
customElements.define("my-element", MyElement);
const myElement = createScoped(MyElement)`color: green;`;
myElement();
<head>
<style>
[data-ps="0.qcif5jua27"] {
color: red;
}
</style>
<style>
[data-ps="0.fep56v6qx1u"] {
color: green;
}
</style>
</head>
<body>
<div data-ps="0.qcif5jua27"></div>
<my-element data-ps="0.fep56v6qx1u"></my-element>
</body>