From e538a0b1505ae0930d388622d204c169d0b41a77 Mon Sep 17 00:00:00 2001 From: ray Date: Thu, 11 Dec 2025 21:56:16 +0000 Subject: [PATCH] update css pseudo slector colors --- README.md | 3 ++- lua/paper-tonic-modern/groups/semantic.lua | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 89df178..7aa5109 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ Record every decision here with a short rationale. Append new entries; do not re - **Test files**: Created test-html.html, test-css.css, test-colors.php for validation - 2025-12-11: Colorscheme Phase 11.7: - **Semantic highlighting**: Custom TreeSitter captures for cross-language consistency - - **CSS semantic captures**: @CssClassName (green c2), @CssIdentifier (strong green c2_strong, bold), @cssPseudoClass (weak green c2_weak), @cssNestingSelector (strong green), @CssUniversalSelector + - **CSS semantic captures**: @CssClassName (green c2), @CssIdentifier (strong green c2_strong, bold), @cssPseudoClass (bold brownish-red primary_strong - distinguishes from green selectors), @cssPseudoElement (bold brownish-red), @cssNestingSelector (strong green), @CssUniversalSelector - **CSS properties**: @CssProp (primary_weak), @CssPropertyValue (bold fg), @CssUnit (delimiter) - **CSS media queries**: @cssMediaFeatureName, @cssMediaQuery, @cssMediaQueryValue - **HTML attributes**: @ClassNameAttribute, @IdAttribute, @DataAttribute (all fg_weak for attribute names) @@ -142,6 +142,7 @@ Record every decision here with a short rationale. Append new entries; do not re - **Custom queries**: Leverages existing after/queries/css/highlights.scm and after/queries/html/highlights.scm - **Priority fix**: Added `(#set! priority 200)` to all custom captures to override built-in captures (@string priority 99, @constant default priority) - **Technical note**: Custom queries require `;extends` directive and higher priority than built-in captures to work correctly + - **Pseudo-class design**: Uses bold brownish-red (primary_strong) instead of green to distinguish behavioral modifiers (:hover, :focus) from structural selectors (.class, #id) ## Project-Local Configuration (design) diff --git a/lua/paper-tonic-modern/groups/semantic.lua b/lua/paper-tonic-modern/groups/semantic.lua index 08b65b0..764ee6c 100644 --- a/lua/paper-tonic-modern/groups/semantic.lua +++ b/lua/paper-tonic-modern/groups/semantic.lua @@ -21,7 +21,13 @@ return { ['@CssIdSelector'] = 'SpecialChar', -- Pseudo-class selectors (:hover, :focus, etc.) - ['@cssPseudoClass'] = { fg = c.c2_weak }, + -- Uses bold primary_strong (brownish-red) to distinguish from green class/ID selectors + -- These are behavioral modifiers, not structural selectors + ['@cssPseudoClass'] = { fg = c.primary_strong, bold = true }, + + -- Pseudo-element selectors (::before, ::after, etc.) + -- Similar to pseudo-classes but for virtual elements + ['@cssPseudoElement'] = { fg = c.primary_strong, bold = true }, -- Nesting selector (& in SCSS/modern CSS) ['@cssNestingSelector'] = { fg = c.c2_strong },