Skip to content

fix(kit): land foreground colors on text slots (Lynx CSS-inheritance)#52

Merged
KealanAU merged 2 commits into
mainfrom
fix/lynx-text-color-inheritance
Jun 2, 2026
Merged

fix(kit): land foreground colors on text slots (Lynx CSS-inheritance)#52
KealanAU merged 2 commits into
mainfrom
fix/lynx-text-color-inheritance

Conversation

@KealanAU

@KealanAU KealanAU commented Jun 2, 2026

Copy link
Copy Markdown
Owner

The Lynx build runs with enableCSSInheritance: false, so a text-* 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.

  • Relocate foreground text-* onto the text-bearing slots (label / title / description / icon / input value) instead of the wrapping container.
  • Form inputs: input, textarea, numberField, select, combobox — typed value + item labels now carry their own color.
  • Interactive: toggle, toggleGroup, chip, islandButton — color moved to label/icon slots.
  • Surfaces/overlays: card (solid), accordion (new bodyText slot), dropdownMenu, tabs, stepper.
  • State-driven child colors switched to the group-data-[state=…] form (the state attr lives on the parent group), incl. fixing select/combobox item-checked color that was using the non-group form.
  • Widen the Tailwind preset safelist to cover 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/kit typecheck + build pass. No .vue slot left referencing a removed slot; group ownership confirmed on each state-driven parent.

KealanAU added 2 commits June 2, 2026 08:06
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.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 2, 2026

Copy link
Copy Markdown

Deploying vyui with  Cloudflare Pages  Cloudflare Pages

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

View logs

@KealanAU KealanAU marked this pull request as ready for review June 2, 2026 18:16
@KealanAU KealanAU merged commit b4b2fc6 into main Jun 2, 2026
3 checks passed
@KealanAU KealanAU deleted the fix/lynx-text-color-inheritance branch June 2, 2026 18:16
@github-actions github-actions Bot mentioned this pull request Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant