Repository navigation
fix(ui): add the missing # to oc-2's light icon-weak-base - #177
Merged
Merged
Conversation
`packages/ui/src/theme/themes/oc-2.json` declared the light variant's `icon-weak-base` as `C7C7C7`. Without the `#` it is still a valid custom property, so it parses, and the resolved tokens are injected into a <style> element that beats the static `--icon-weak-base` in styles/theme.css — so the malformed value wins the cascade and only fails at `var()` substitution, where an invalid computed value falls back to the inherited value for inherited properties and the initial value otherwise. Measured on the default light theme: `color:` consumers painted their parent's color instead of the weak grey, and `background:`/`fill:` consumers painted nothing. That blanked the release-notes carousel indicators and the neutral diff-changes blocks, and rendered the file-tree, settings-keybinds and settings-models icons at full strength. oc-2 is the only one of the 37 themes that declares this token literally and the only malformed one; the rest take the derived neutral[6]. Dark was always correct. Reported upstream as anomalyco/opencode#41503. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.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.
packages/ui/src/theme/themes/oc-2.jsonline 28 declared the light variant'sicon-weak-baseasC7C7C7— no#. Dark (line 264) was always correct.#C7C7C7is unambiguously what was meant: it matchestext-weakerdeclared a few lines above in the same block.Why it never surfaced as an error
Three things kept it quiet:
styles/theme.cssdoes declare--icon-weak-base: #dbdbdb, but resolved theme tokens are injected into a<style>element bytheme/context.tsx, which overrides the static sheet. The typo wins the cascade.--icon-weak-base: C7C7C7is a perfectly valid custom-property declaration — they accept almost any token sequence — so nothing errors at parse time.var()resolving to garbage makes the property invalid at computed-value time, which falls back to the inherited value for inherited properties and the initial value otherwise.Measured in the running app on the default light theme:
What was broken
Light mode only.
dialog-release-notes.tsx:117bg-diff-changes.tsx:82fillon<rect>in<svg fill="none">fill: none, don't renderfile-tree.tsx:475colorsettings-keybinds.tsx:493colorsettings-models.tsx:78coloroc-2is the only one of the 37 themes that declares this token literally, and the only malformed one — every other theme takes the derivedneutral[6]fromresolve.ts. Butoc-2is the default, so this was the default light-mode experience.Upstream
This is upstream's typo, not fork drift —
anomalyco/opencode@devhas the identical value at the same line. Reported as anomalyco/opencode#41503, including a suggestion to guard against recurrence (schema requiring^#, or a warn inresolveThemeVariant). TheDIVERGENCES.mdrow says to drop our line and take upstream's once that lands.🤖 Generated with Claude Code