OriaTheme
GitHub

API參考·Tailwind橋

@oriatheme/tailwind

將 oria-standard@2 運行時變數靜態對應到 Tailwind CSS v4 @theme 內嵌命名空間。

包裝及環境

純靜態CSS加發電機; Tailwind CSS 4.3.3 僅用於其自己的建造和測試,而不用作消費者運行時依賴項。

bash
pnpm add @oriatheme/tailwind

使用消費者專案已經選擇的套件管理器和鎖定檔案。範例僅使用包根匯出;不要從 src、dist 或註冊表範本深度匯入。

CSS bridge

@oriatheme/tailwind/oria.css is the static @theme inline bridge for the default oria prefix: 43 colors, font families with nine weights, a 13-step text scale (text.md maps to --text-base with paired line heights), leading/tracking, --spacing, derived radius, shadow, blur, and --ease-oria-*, plus explicit backdrop-oria-*, duration-oria-*, inset-shadow-oria, shadow-highlight, bg-oria-canvas, and bg-oria-surface utilities.

css
@import "tailwindcss";
@import "@oriatheme/colors/styles.css";
@import "@oriatheme/colors/tailwind.css";
@import "@oriatheme/tailwind/oria.css";

生成器和自訂前綴

出口簽名描述
generateOriaTailwindBridge(options?: { prefix?: string }) => string為經過驗證的自訂前綴產生靜態橋。
oriaTailwindBridgeDefaultPrefix"oria"打包的 oria.css 使用的前綴。

自訂前綴必須預先建置到靜態網橋中; CSS 變數名稱在執行時永遠不會連接。

bash
oria theme tailwind-bridge --prefix acme --out src/oria-tailwind.css