|
|
|
|
|
by c-smile
1694 days ago
|
|
I think that still nothing can match Sciter's style sets feature. JS (mycomponent.js): export function MyComponent() {
return <div styleset={__DIR__ + "components.css#my-component"}>
<header>Hi!</header>
...
</div>;
}
CSS (components.css) : @set my-component {
:root { background:red; } /* the component itself */
:root > header { background:gold; } /* its content */
:root > footer { background:var(footerColor,#0F0); } /* use of vars that can be set in JS too */
}
|
|