0.2.1 • Published 12 months ago

css-in-bun v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

CSS-in-Bun macro inspired by Meta's stylex (and johanholmerin/style9)

Usage:

// build.ts
import { Collector } from "css-in-bun/build";

using collector = Collector();

const res = await Bun.build({
  entrypoints: ["./src/index.ts"],
  outdir: "dist",
});

await Bun.write("./dist/style.css", collector.collect());

// component.tsx
import { create } from "css-in-bun" assert { type: "macro" };
const styles = create({
  test: {
    color: "red",
    backgroundColor: "green",
    "@media (min-width: 80em)": {
      color: "purple",
      ":hover": {
        color: "black",
      },
    },
    ":hover": {
      color: "yellow",
    },
  },
});

const Test = () => <div className={styles.test}></div>

Due to bun's bug(https://github.com/oven-sh/bun/issues/6014), use keyframes may cause bun crash.

0.2.1

12 months ago

0.2.0

12 months ago

0.1.7

12 months ago

0.1.6

1 year ago

0.1.4

1 year ago

0.1.5

1 year ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago