Skip to content

[upstream #16550] Theme root markers do not resolve to the nearest themed root #210

Description

@berry-13

Raised on LibreChat-AI#16550: LibreChat-AI#16550 (comment)

applyResolvedTheme mirrors two appearance choices on the root it themes, data-theme-disabled (disabledStyle: fill) and data-theme-field-focus (fieldFocusStyle: border), and removes the attribute for the default style. The variants that read them (theme-disabled, theme-disabled-within and theme-field-border in tokens.css, plus the edge-focus rules in Field.css) match any ancestor carrying the marker, :is([data-theme-...] *). A root themed with the default style nested inside a root themed with the other style therefore keeps the ancestor's treatment: a ring-focus theme inside a border-focus one still focuses by the edge, and a dim theme inside a fill one still fills disabled controls.

No app surface nests theme roots today; applyResolvedTheme(theme, root) is exported for consumers that do.

Gap: resolve both markers to the nearest themed root. Options: write an explicit value for every themed root and scope the variants with @scope (...) to (...), or carry the choices as inherited custom properties the primitives read directly, so the nearest root wins by inheritance. Cover border-inside-ring, ring-inside-border and three-level nesting for both markers.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: packagesreviewctl followups statefixedreviewctl followups staterefactorreviewctl followups state

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions