fix(kit): land foreground colors on text slots (Lynx CSS-inheritance)#52
Merged
Conversation
enableCSSInheritance is off in the Lynx build, so a text-* color on a wrapping <view> slot never reaches the nested text/icon — it rendered in the default color, invisible on dark/colored surfaces. Relocate foreground color onto the text-bearing slots across the form inputs, toggles, chip, islandButton, card, accordion, dropdownMenu, tabs and stepper. State-driven child colors use the group-data-[state=…] form; widen the preset safelist to cover those variants so they aren't purged.
Deploying vyui with
|
| Latest commit: |
3dda336
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0d0b327c.vyui-2ow.pages.dev |
| Branch Preview URL: | https://fix-lynx-text-color-inherita.vyui-2ow.pages.dev |
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.
The Lynx build runs with
enableCSSInheritance: false, so atext-*color set on a wrapping<view>slot never reaches the nested text/icon — it rendered in Lynx's default color, invisible on dark/colored surfaces (the trigger here was neutral-solid buttons, but it was a latent bug across the kit). This continues the fix already landed for Button/Badge/Alert in #49.text-*onto the text-bearing slots (label / title / description / icon / input value) instead of the wrapping container.input,textarea,numberField,select,combobox— typed value + item labels now carry their own color.toggle,toggleGroup,chip,islandButton— color moved to label/icon slots.card(solid),accordion(newbodyTextslot),dropdownMenu,tabs,stepper.group-data-[state=…]form (the state attr lives on the parentgroup), incl. fixingselect/comboboxitem-checked color that was using the non-group form.group-data-[state=on|open|inactive|checked]+(group-)data-[highlighted]so those dynamic colors aren't purged.Surfaces (
bg-*/border-*/divide-*), shades and neutral structural borders are unchanged — this only relocates foreground color so it actually renders.Out of scope (proposed follow-ups for full nuxt/ui parity): semantic surface tokens (
bg-default/elevated/muted,text-muted/dimmed/inverted,border-default) and dark mode — both need design decisions on token names/CSS vars/palettes rather than a mechanical sweep.Verified:
@vyui/kittypecheck + build pass. No.vueslot left referencing a removed slot;groupownership confirmed on each state-driven parent.