Background
Across Codex, the focus style appears on mousedown/active for some components, such as inputs and card, but on mouseup in other instances like button and accordion. We should make these consistent.
Considerations
- There doesn't really seem to be a standard in the common large-scale design systems elsewhere, especially since some only apply focus-visible.
- The focus style being applied on mouseup allows us to design an active state for components, offering a smoother transition through the act of interacting with an element.
- The focus appearing on mousedown/active might feel a bit premature.
Acceptance criteria
- We have developed logic for when the focus style appears and this introduces more consistency.
- This new logic is applied to all components.