Drakk3 Portfolio uses Tailwind CSS v4 with a custom theme system that bridges compatibility with shadcn/ui components. This guide explains how the dual-layer theme configuration works.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Drakk3/drakk3/llms.txt
Use this file to discover all available pages before exploring further.
Architecture Overview
The theme system uses two layers:@themedirective - Tailwind v4’s native configuration insrc/styles/global.css:rootvariables - HSL value bridge for shadcn/ui compatibility
Tailwind v4 is configured via the Vite plugin (
@tailwindcss/vite), not PostCSS. The tailwind.config.mjs exists alongside for shadcn/ui compatibility, but @theme in global.css is the source of truth.The @theme Directive
Tailwind v4 introduces the@theme directive for defining design tokens directly in CSS. All color, spacing, and animation tokens are defined here.
Color Tokens
Colors use the--color-* prefix and include full HSL values:
src/styles/global.css
Usage in Tailwind Classes
These tokens are automatically available as Tailwind utilities:The shadcn HSL Bridge
shadcn/ui components expect HSL values without thehsl() wrapper. The :root layer provides this compatibility:
src/styles/global.css
Why Two Layers?
@theme (Tailwind v4)
- Native Tailwind v4 tokens
- Uses
--color-*prefix - Includes full
hsl()wrapper - Used by Tailwind utilities
:root (shadcn)
- Compatibility with shadcn/ui
- No prefix, just
--name - HSL values only (no wrapper)
- Used by
hsl(var(--name))syntax
shadcn Component Usage
shadcn components reference colors usinghsl(var(--name)):
src/components/ui/card.tsx
tailwind.config.mjs extends these variables:
tailwind.config.mjs
Dark-Only Design
This portfolio uses a dark-only design with no light mode toggle. All colors are optimized for dark backgrounds.Color Philosophy
- Background: Near-black (
hsl(240 5% 4%)) - Foreground: Off-white (
hsl(0 0% 94%)) - Primary: Pure white (
hsl(0 0% 100%)) - Muted: Zinc-based grays for subtle elements
- Accent: Minimal, matching secondary for consistency
Customizing the Theme
Changing Colors
To change colors, update both layers insrc/styles/global.css:
Adding New Colors
Follow the same pattern for custom colors:src/styles/global.css
tailwind.config.mjs:
tailwind.config.mjs
Border Radius System
Border radius tokens are defined in@theme:
:root layer provides a single value for shadcn:
tailwind.config.mjs:
Best Practices
Use Tailwind utilities
Prefer
bg-background over custom CSS when possibleKeep layers in sync
Always update both
@theme and :root when changing colorsTest shadcn components
Verify changes work with both custom and shadcn components
Use semantic names
Follow the naming pattern:
background, foreground, primary, etc.Related Resources
Color Tokens
Complete reference of all color tokens and their HSL values
Animations
Animation system and keyframe definitions