@rhjs/atomic-css
TypeScript icon, indicating that this package has built-in type declarations

0.3.5 • Public • Published

rh-atomic-css

css in js + atomic

Usage

default

import { rh, mount } from "@rhjs/core";
import { Scope } from "@rhjs/builtin";
import { html } from "@rhjs/tag";
import { enable } from "@rhjs/atomic-css";

// all default settings
enable();

const app = html`<div $class="font-bold text-gray-900">hello world</div>`;
mount("#app", app);

custom configuration

import { rh, mount } from "@rhjs/core";
import { Scope } from "@rhjs/builtin";
import { html } from "@rhjs/tag";
import { enable, setAtomicConfig } from "@rhjs/atomic-css";

// inject config to context
setAtomicConfig({
    presets: [], // cover all preset (tailwind css)
    hash: false
})
// inject to framework context, and hook attribute `$class` (default: $atomic)
enable("$class");

const app = html`<div $class="font-bold text-gray-900">hello world</div>`;
mount("#app", app);

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @rhjs/atomic-css

Weekly Downloads

1

Version

0.3.5

License

MIT

Unpacked Size

2.05 MB

Total Files

12

Last publish

Collaborators

  • luke_zhang