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.
Raised on LibreChat-AI#16550: LibreChat-AI#16550 (comment)
applyResolvedThememirrors two appearance choices on the root it themes,data-theme-disabled(disabledStyle: fill) anddata-theme-field-focus(fieldFocusStyle: border), and removes the attribute for the default style. The variants that read them (theme-disabled,theme-disabled-withinandtheme-field-borderintokens.css, plus the edge-focus rules inField.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.