Fix Accordion SVG icon colour not being set in Dark Mode#74
Open
bencounsell wants to merge 3 commits into
Open
Fix Accordion SVG icon colour not being set in Dark Mode#74bencounsell wants to merge 3 commits into
bencounsell wants to merge 3 commits into
Conversation
- Add dark mode color settings (darkShade, darkColorStripId) to iconColor in all accordion templates that were missing them - Use injectPrefixOnDarkModeColors in hooks.js to ensure the [&>svg]: selector prefix is correctly applied to dark mode color classes Fixes #73 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The iconColorClosed format is {{value}} (raw color name), so when
dark mode is configured the dark class is missing the text- utility
prefix. Added .replace(/dark:/g, 'dark:text-') to inject text- into
dark values before constructing the full class string.
Made-with: Cursor
38d5bd4 to
a30c170
Compare
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.
Summary
Fixes #73 — The Accordion SVG icon colour was not being set correctly in Dark Mode.
Root Cause
The hooks.js did not use
injectPrefixOnDarkModeColorsto ensure the[&>svg]:selector prefix was applied to dark mode colour classes. Without this, dark modedark:text-*classes were missing the[&>svg]:child selector, so the SVG element didn't receive the correct colour in dark mode.Changes
iconColorandiconColorClosedwithinjectPrefixOnDarkModeColors()to ensure dark mode colour classes correctly target the SVG child element via[&>svg]:Test Plan
elementsapp://downloadDocument/XArukxz8fVyZ🤖 Generated with Claude Code