Skip to content

theme: evaluate a uniform focus-style model in air tokens (upstream nuxt/ui#6576) #191

Description

@IgorShevchik

Context

Upstream nuxt/ui shipped b026ca2cfeat(theme): uniformize focus styles across components (nuxt/ui#6576) — a large change (~50 theme files, 200+ files incl. snapshots) that replaces nuxt/ui's per-component focus styling with a single uniform pattern:

outline-{color}/25 focus-visible:outline-3   /* + focus-visible:ring-{color} where a ring is also kept */

built on nuxt/ui's options.theme.colors loops and semantic tokens (outline-inverted, ring-accented, bg-{color}, …), plus:

  • a base reset a:focus-visible { outline-offset: 0 } in src/runtime/index.css;
  • overflow: hidden added to the accordion/collapsible keyframes in src/runtime/keyframes.css.

Decision in the sync stream — SKIPPED (no-op)

This commit is not portable 1:1 to b24ui and was recorded as a skip in the sync ledger (cursor advanced, no source change). Rationale:

  • b24ui has its own focus-styling system based on air-design tokens — e.g. focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-(--b24ui-border-color), --ui-color-design-selection-content, style-blurred-bg-input — which is intentionally different from nuxt/ui's generic outline/ring model.
  • b24ui has no options.theme.colors (no per-color compound loops), so the upstream structure (outline-${color}/25, bg-${color}, …) has no equivalent.
  • Adopting the upstream model would overwrite b24ui's air design system focus styles — a design regression, not a faithful port.

Scope of this issue (evaluate, don't blindly port)

Decide deliberately whether b24ui wants a uniform focus model expressed in air tokens, and if so design + apply it:

  • Define a single air-token focus pattern (the b24ui analogue of outline-3 + translucent ring) and apply it consistently across components, replacing the current per-component focus classes.
  • Consider the two generic, design-agnostic bits from upstream that would apply cleanly if desired:
    • a:focus-visible { outline-offset: 0 } base reset (Chromium link focus) in src/runtime/index.css;
    • overflow: hidden in the accordion/collapsible @keyframes in src/runtime/keyframes.css (animation-clipping correctness, unrelated to focus).
  • Regenerate component snapshots after any focus-style change.

References

No behaviour change has been made by the sync stream; this is a design decision to be made separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions