@aphrody/bun-fluent
v1.4.6-aphrody.1
Published
Fluent 2 design tokens (from microsoft/fluentui packages/tokens) as JS, CSS custom properties, a Tailwind v4 theme (fluent:theme.css) and WinUI 3 resources
Readme
@aphrody/bun-fluent
Fluent 2 design tokens for Bun. The token sources of aphrody-labs/fluentui packages/tokens (MIT, LICENSE-fluentui.txt, pinned by vendor/fluentui and absorbed into src/tokens) as:
- JS:
webLightTheme,webDarkTheme,teamsLightTheme...,typographyStyles,brandWeb, every global token. - CSS:
fluentTokensCss()writes the custom properties read by@fluentui/react-components(--colorBrandBackground,--borderRadiusMedium,--shadow8,--durationFast...); light on:root, dark on.darkand onprefers-color-scheme: darkunless.lightis set. - Tailwind v4:
fluentTailwindTheme()is an@theme inlineblock (bg-fluent-brand-background,text-fluent-neutral-foreground-1,rounded-fluent-medium,shadow-fluent-8,font-fluent-base,text-fluent-base-300,ease-fluent-decelerate-mid,p-fluent-m) plus onefluent-<style>utility per typography style (fluent-body-1,fluent-title-3...). - WinUI 3:
winuiResourcesmaps WinUI theme resources to Fluent tokens and Material 3 tokens;fluentWinuiResources()writes light, dark and high-contrast XAML theme dictionaries forbun:winui.
import tailwind from "@aphrody/bun-plugin-tailwind";
import { fluentPlugin, fluentSchemeImport } from "@aphrody/bun-fluent";
await Bun.build({
entrypoints: ["./index.html"],
plugins: [fluentPlugin(), tailwind({ schemeImport: fluentSchemeImport() })],
});@import "tailwindcss";
@import "fluent:theme.css";fluent:tokens.css holds the custom properties only.
