From 81fae13219dca4f13dd20947562e3b1c8cdcab84 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 26 Sep 2025 21:15:31 -0500 Subject: [PATCH] Remove all @apply usage from index.css - Convert @apply border-border to pure CSS: border-color: hsl(var(--border)) - Convert @apply bg-background text-foreground to pure CSS equivalents - Update comment to reflect complete @apply removal - Update AGENTS.md to strengthen prohibition language - Maintain all theming functionality with pure CSS custom properties --- AGENTS.md | 4 ++-- src/index.css | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 15db6fb..c68c392 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1079,9 +1079,9 @@ When users specify color schemes: ### TailwindCSS Guidelines -**CRITICAL**: Avoid using the `@apply` at-rule in CSS files. Instead, create custom components with the desired className and wrap elements where that style should be applied. +**CRITICAL**: The `@apply` at-rule is completely forbidden in this project. Instead, create custom components with the desired className and wrap elements where that style should be applied. -The `@apply` directive is non-standard CSS and goes against the component-driven design philosophy of Tailwind. It creates implicit dependencies and makes styles harder to trace and maintain. +The `@apply` directive is non-standard CSS and goes against the component-driven design philosophy of Tailwind. It creates implicit dependencies and makes styles harder to trace and maintain. This project uses pure CSS with CSS custom properties for any global styles. **✅ Correct - Component-based approach:** ```tsx diff --git a/src/index.css b/src/index.css index 7aa1ccf..889dad5 100644 --- a/src/index.css +++ b/src/index.css @@ -3,14 +3,13 @@ @tailwind utilities; /* - * IMPORTANT: The use of @apply is generally forbidden in this project. + * IMPORTANT: The use of @apply is forbidden in this project. * * @apply is non-standard CSS and goes against the component-driven design philosophy * of Tailwind. Instead of using @apply, create custom React components with the * desired className and wrap elements where that style should be applied. * - * The only exceptions are the base layer styles below, which are necessary for - * the shadcn/ui design system and global element defaults. + * All styles in this file use pure CSS with CSS custom properties for theming. */ @layer base { @@ -103,10 +102,11 @@ @layer base { * { - @apply border-border; + border-color: hsl(var(--border)); } body { - @apply bg-background text-foreground; + background-color: hsl(var(--background)); + color: hsl(var(--foreground)); } } \ No newline at end of file