v2: Implement Wintry Preset Theme (#1902)

Co-authored-by: AdrianGonz97 <31664583+AdrianGonz97@users.noreply.github.com>
This commit is contained in:
Chris Simmons
2023-08-18 12:51:08 -05:00
committed by GitHub
parent 158d029eb0
commit 58b0c78489
28 changed files with 173 additions and 1374 deletions

View File

@@ -2,7 +2,7 @@ import { readFileSync } from 'fs';
import { writeFile } from 'fs/promises';
import postcss from 'postcss';
import postcssJs from 'postcss-js';
import type { Theme } from '../src/tailwind/themes';
import type { PresetTheme } from '../src/tailwind/themes';
// Converts a theme's .css file into a .ts file.
export async function convertTheme(name: string) {
@@ -17,9 +17,11 @@ export async function convertTheme(name: string) {
delete cssInJs[':root'];
const theme = {
name,
properties: properties,
enhancements: { ...cssInJs }
} satisfies Theme;
enhancements: { ...cssInJs },
properties_dark: {}
} satisfies PresetTheme;
// Creates the generated CSS-in-JS file
await writeFile(