mirror of
https://github.com/remorses/gpuix.git
synced 2026-10-29 03:04:52 +08:00
Before, any `focusVisible` style (even `{}`) returned early from
apply_focus_visible, so one key controlled two states: the look of the
element while it has keyboard focus, and whether it dims while another
control has it. A custom focus ring therefore could not dim.
Now the two are separate:
- `focusVisible` only styles the element while it has keyboard focus
- every other focusable element off the focus path dims to 40%, with or
without a `focusVisible`
- new style key `keyboardFocusDim: false` keeps one element at full opacity
(StyleDesc.keyboard_focus_dim, not inherited, excluded from state styles)
- `Select.Content` and `Dialog.Popup` (React and Solid) switch from
`focusVisible: {}` to `keyboardFocusDim: false`
- the window-wide `render({ keyboardFocusDim: false })` option is unchanged
Test: the focus scene now checks that `keyboardFocusDim: false` opts an
element out and that an element with a focusVisible ring still dims.
README Focus styles and the pending focus changeset describe the new rule.
Session: ses_f231682b0ffe2fr5xaNLPPWQre