feat: Passkey icon in dark and light themes, with matching spacing
Back to our planProblem
On the login page the passkey icon looks wrong in dark mode: the icon file has an opaque white background, so it shows as a white tile on the dark button. Its margins are also uneven and tight (about 14% to 16% of its height) next to the Google "G", so the two buttons don't read as a matched pair.
Proposed fix
- Use the FIDO-provided version made for dark backgrounds (reversed or white) in dark mode, and the colour version in light mode, chosen by theme with no recolouring, outline, shadow or badge (FIDO's usage rules).
- Give the passkey icon the same top and bottom spacing as the Google "G" in its button, set once in
BrandLogoso both logos share it. - Keep the icon at its current size (above FIDO's minimum height) and keep the credit line.
Existing work compared
Searched open and closed issues for passkey icon, dark mode and BrandLogo. The icon came in with the passkey sign-in work under epic #313 (#1365, closed); this is a follow-up to how that icon looks, not new sign-in behaviour.
Acceptance criteria
- Not done: In dark mode the passkey icon has no white tile and is clearly visible (3:1 contrast or better against the button).
- Not done: In light mode it looks as before.
- Not done: Top and bottom spacing around the passkey icon equals that around the Google "G".
- Not done: Both buttons checked side by side in light and dark at six widths, including a phone.
- Not done: The icon is not recoloured, outlined, shadowed, stretched or rotated.
- Not done: The UI kit note and gallery entry describe the theme-dependent logo.
Files likely touched
src/platform/ui/BrandLogo.tsx (and its test), public/brand/ (dark variant), src/platform/ui/README.md, docs/ui/component-set.md.
Must not touch
Sign-in behaviour, the sign-in and account modules' logic, and the FIDO credit line wording.
Open questions
A dark-background version of the icon file is needed from FIDO's download; the owner has only the single colour PNG so far. If FIDO's set has none that fits, an approved custom version can be requested from FIDO (the owner's decision).
Area
frontend, auth, styling
Priority
priority: medium
Generated by Claude Code, opens in a new tab