diff --git a/scripts/create-styles.js b/scripts/create-styles.js index 0a0b72d..69c68f1 100755 --- a/scripts/create-styles.js +++ b/scripts/create-styles.js @@ -4,22 +4,10 @@ const path = require('path'); // Find all bundled CSS files (tsdown generates hashed names like components-D2DRqJsz.css) const distDir = path.join(__dirname, '../dist'); -const allCssFiles = fs.readdirSync(distDir) - .filter(f => f.endsWith('.css') && !f.startsWith('styles')); - -// Separate global-styles files from other CSS files -// Global styles must be imported FIRST so CSS variables are defined before use -const globalStylesFiles = allCssFiles - .filter(f => f.startsWith('global-styles')) - .map(f => `./${f}`); - -const otherCssFiles = allCssFiles - .filter(f => !f.startsWith('global-styles')) +const cssFiles = fs.readdirSync(distDir) + .filter(f => f.endsWith('.css') && !f.startsWith('styles')) .map(f => `./${f}`); -// Concatenate with global-styles first -const cssFiles = [...globalStylesFiles, ...otherCssFiles]; - // Create styles.css that imports all component CSS const importsContent = cssFiles .map(f => `@import '${f}';`) diff --git a/src/global-styles.css b/src/global-styles.css deleted file mode 100644 index 1089020..0000000 --- a/src/global-styles.css +++ /dev/null @@ -1,81 +0,0 @@ - -@theme { - --color-brand: rgb(253, 104, 62); - --font-sans: - ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", - "Segoe UI Symbol", "Noto Color Emoji"; - --font-mono: - ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", - "Courier New", monospace; -} - -/** - * Theme-aware CSS custom properties - * These variables change based on the theme class set by next-themes - */ -:root, -.light { - /* Neutral colors - light mode */ - --recce-neutral-50: #fafafa; - --recce-neutral-100: #f5f5f5; - --recce-neutral-200: #e5e5e5; - --recce-neutral-300: #d4d4d4; - --recce-neutral-700: #404040; - --recce-neutral-800: #262626; - - /* Semantic colors - light mode */ - --recce-bg-default: #ffffff; - --recce-bg-paper: #ffffff; - --recce-bg-subtle: #fafafa; - --recce-bg-muted: #f1f5f9; - --recce-border-default: #d4d4d4; - --recce-border-light: #e5e5e5; - --recce-text-primary: #171717; - --recce-text-secondary: #525252; - - /* Gutter/split pane colors */ - --recce-gutter-bg: #eeeeee; - --recce-gutter-hover: #ff6e42; -} - -.dark { - /* Neutral colors - dark mode */ - --recce-neutral-50: #fafafa; - --recce-neutral-100: #f5f5f5; - --recce-neutral-200: #e5e5e5; - --recce-neutral-300: #d4d4d4; - --recce-neutral-700: #404040; - --recce-neutral-800: #262626; - - /* Semantic colors - dark mode */ - --recce-bg-default: #171717; - --recce-bg-paper: #262626; - --recce-bg-subtle: #262626; - --recce-bg-muted: #1e293b; - --recce-border-default: #525252; - --recce-border-light: #404040; - --recce-text-primary: #fafafa; - --recce-text-secondary: #a3a3a3; - - /* Gutter/split pane colors */ - --recce-gutter-bg: #404040; - --recce-gutter-hover: #ff6e42; -} - -/* - The default border color has changed to `currentcolor` in Tailwind CSS v4, - so we've added these compatibility styles to make sure everything still - looks the same as it did with Tailwind CSS v3. - - If we ever want to remove these styles, we need to add an explicit border - color utility to any element that depends on these defaults. -*/ -@layer base { - *, - ::after, - ::before, - ::backdrop, - ::file-selector-button { - border-color: var(--color-gray-200, currentcolor); - } -} diff --git a/tsdown.config.ts b/tsdown.config.ts index 5af28d8..54fd834 100644 --- a/tsdown.config.ts +++ b/tsdown.config.ts @@ -13,7 +13,6 @@ export default defineConfig({ hooks: 'src/hooks/index.ts', types: 'src/types/index.ts', theme: 'src/theme.ts', - 'global-styles': 'src/global-styles.css', }, platform: 'neutral', format: ['cjs', 'esm'],