ls-deno/twind.config.ts

25 lines
782 B
TypeScript
Raw Normal View History

2022-09-27 14:41:17 -05:00
import { Options } from "$fresh/plugins/twind.ts";
2022-09-30 09:34:07 -05:00
import { apply } from "twind";
2022-10-01 14:03:15 -05:00
import { css } from "twind/css";
const button = apply(
"bg-blue(400 500(hover:& focus:&) dark:(600 700(hover:& focus:&))) px-4 py-2 rounded cursor-pointer ring(focus:& current)",
);
const input = apply(
"rounded bg-gray(200 300(hover:& focus:&) dark:(800 700(hover:& focus:&))) px-4 py-2 ring(focus:& current)",
);
2022-09-30 09:34:07 -05:00
2022-09-27 14:41:17 -05:00
export default {
selfURL: import.meta.url,
2022-10-01 14:03:15 -05:00
preflight: (preflight) =>
css(preflight, {
body: apply("bg-white text-black dark:(bg-gray-900 text-white)"),
"body input, body textarea": input,
"body button, body input[type=submit]": button,
"body a": apply(
"text-blue(600 700(hover:&) dark:(400 300(hover:&))",
),
}),
2022-09-27 14:41:17 -05:00
} as Options;