fix: use direct hex colors for visual comparison bars
Fixed the colored bar segments not showing: 🎨 Direct Color Implementation: - Added getCategoryColorHex() function to return actual hex values - Changed from CSS variables to direct backgroundColor - No more var(--color-*) that wasn't resolving - Direct hex colors like #3B82F6 for length, #10B981 for mass, etc. ✨ Visual Improvements: - Taller bars (h-8, 32px) for better visibility - Drop shadow on percentage labels for readability - White text on bars >30% filled - Foreground color text on smaller bars - pointer-events-none on overlay to prevent interaction issues 🔧 Updated Components: - MainConverter: Import and use getCategoryColorHex() - VisualComparison: Accept hex color string directly - lib/units: Added getCategoryColorHex() with all 23 colors The bars will now definitely show with vibrant colors! 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
@source "../components/**/*.{js,ts,jsx,tsx}";
|
||||
@source "../components/converter/*.{js,ts,jsx,tsx}";
|
||||
@source "../components/providers/*.{js,ts,jsx,tsx}";
|
||||
@source "../components/ui/*.{js,ts,jsx,tsx}";
|
||||
@source "*.{js,ts,jsx,tsx}";
|
||||
|
||||
@custom-variant dark (&:is(.dark *));
|
||||
|
||||
Reference in New Issue
Block a user