feat: Implement OKLCH color space architecture with semantic aliases and theme system#1
Open
RPDevJesco wants to merge 2 commits intomasterfrom
Open
feat: Implement OKLCH color space architecture with semantic aliases and theme system#1RPDevJesco wants to merge 2 commits intomasterfrom
RPDevJesco wants to merge 2 commits intomasterfrom
Conversation
…and theme system Major architectural improvements: - OKLCH color foundation with separate lightness/chroma/hue variables - Semantic alias layer (success, danger, warning, info) alongside priority names - Theme system supporting multiple named themes (enchanted-forest, ocean-breeze, etc.) - Automatic dark mode support via prefers-color-scheme - Layer-based CSS architecture for organized customization - Comprehensive README documentation Breaking changes: - Removed legacy token.css from default imports (still available in dual layer) - Converted color_token.css to user customization layer All existing functionality maintained: - Priority-based naming (Primary→Denary) - 5-color and 10-color modes - All color variations (tints, shades, highlights) - Component color system - Visual harmony over logical order philosophy Co-Authored-By: jesco@rpdevstudios.com <jglover88@hotmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Root cause: CSS layer cascade prevented dark mode from working. The dark mode rules in the 'base' layer were being overridden by higher-priority layers (themes, semantic-aliases, override). Solution: Moved dark mode rules from token_oklch.css to unlayered CSS at the end of site.css, giving them the highest priority in the cascade. Changes: - Added unlayered dark mode rules to site.css for both automatic (OS preference) and manual (data-color-scheme attribute) dark mode - Removed non-functional layered dark mode rules from token_oklch.css - Updated README.md with comprehensive dark mode documentation including JavaScript toggle examples Dark mode now correctly: - Inverts OKLCH lightness values (e.g., 35% -> 65%) - Redefines color variables inside media query and attribute selector - Preserves hue and chroma for harmonious color relationships - Supports both automatic detection and manual override Tested and verified working in browser with visual confirmation. Co-Authored-By: jesco@rpdevstudios.com <jglover88@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ZephyrCSS v2.0: OKLCH Architecture + Functional Dark Mode
Summary
This PR transforms ZephyrCSS from a hex-based color system to a modern OKLCH-based architecture while maintaining full backward compatibility. The major enhancement is fixing the broken dark mode that was previously non-functional due to CSS layer cascade issues.
Key Architectural Changes
--success,--danger, etc.) alongside priority-based namesdata-themeattributeDark Mode Fix Details
Root Cause: Dark mode rules were in the
baseCSS layer and being overridden by higher-priority layers (themes,semantic-aliases,override).Solution: Moved dark mode rules to unlayered CSS at the end of
site.cssfor highest cascade priority. Now both automatic (prefers-color-scheme: dark) and manual (data-color-scheme="dark") dark mode work correctly.Review & Testing Checklist for Human
data-color-scheme="dark"and verify colors actually change visually in browserdata-theme="ocean-breeze",data-theme="sunset-warmth"etc. work correctlyRecommended Test Plan
index.htmlin browserdocument.documentElement.setAttribute('data-color-scheme', 'dark')oklch(35% 0.05 196)tooklch(65% 0.05 196)data-theme="ocean-breeze",data-theme="monochrome-pro"var(--success)should equalvar(--quinary)Notes
token.cssfrom default imports (still available induallayer)Link to Devin run: https://app.devin.ai/sessions/45587d49071742b0ad4e1ffb7d711606
Requested by: @RPDevJesco