Closed ryelle closed 1 year ago
Can move forward, though in general to all of wp.org, we should unify on a single focus style. I think @fcoveram may have designed some focus styles here? Alternatively I'd be happy to reuse the Gutenberg focus styles.
Can move forward, though in general to all of wp.org, we should unify on a single focus style. I think @fcoveram may have designed some focus styles here? Alternatively I'd be happy to reuse the Gutenberg focus styles.
I grabbed this directly from the design library (see #96), so I assumed this was the designed focus style. We did have a separate solid outline focus on the search field and button, we could use something like this but it might look odd on the outline-style buttons
That dash border in Button / Big Desktop
and Button / Big Mobile
come from previous designs, likely when News was redesigned.
I prefer the new solid outline style, and for the border variants in the Design Library, I can propose a new style.
Thanks both! I personally lean towards the newer style, but I suppose no reason to block this PR then, we can follow up separately. Ideally we have a single unified style across all, when it comes to focus.
I updated all Button
components with the new focus style
Here's a version with the latest designs in figma. I also left these comments there, feel free to reply in either location.
Default
Focus
Hover
Active
Looks good, and non-blocking but can the focus style on "outline on dark" just be a thicker white border, just like it's a thicker blue order on the light background? In general feel free to go pure white with the focus style on the dark background if you need to, the default blueberry doesn't always meet contrast.
Thanks for the replies on figma, @fcoveram! I've updated the styles again to match, with one tweak— I flipped the outlines on the "on dark" buttons, so that the white is on the outside, which adds slightly better contrast. I can undo that, but I think it matches the on-light buttons better too.
I'm going to merge this — if there's more design feedback once it's on production we can iterate from there 👍🏻
Looks good, fine to ship.
A small nuance that I failed to clarify, and something that isn't urgent to fix, this is mostly visible in the "outline on dark" where we have two colors and should only have one.
Essentially, for outline buttons, the outline simply becomes thicker on focus. It doesn't change color. Here are two sheets from how the Gutenberg components work (and these wp.org components can/should be similar). Light backgrounds:
Dark backgrounds:
Notice especially the focus style of the outline buttons.
Fixes #96 — Update the active, hover, and focus states for "on dark" buttons. This ensures the buttons have visible interactive states.
Screenshots
How to test the changes in this Pull Request: