-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new focus style to buttons #1315
Conversation
Looking good so far, added some comments to make it more consistent with the rest of the codebase. 👍 |
Looking good so far The secondary It also appears to have lost the margin-top that is applied in this state to give the button it's "pushed down" feel |
I don't think this is working correctly for secondary or warning buttons at the minute. They're not getting the yellow highlight, and in the case of the warning buttons the text colour is changing to black (on red) |
@36degrees Ah yes I see that, I think thats because I removed the important and that was forcing everything to work. I'll take a look at it as @NickColley suggested perhaps moving the focus/hover state to the bottom |
7830d70
to
deb144c
Compare
The original avoids the focus state when hovered, and active, which is not consistent in this version. |
Buttons with modifiers have inconsistent focus state compared with the original. Let me know if you wanna go over any of this feedback together. |
12cb46a
to
5ed9aa5
Compare
It was decided that the final version of the buttons would not have a double thick border like links and the most noticeable changes would be the background colour changing to yellow and the bottom border colour changing to black |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Dave's original design, the focus style is not shown when the user is actively (:active) pressing the button, or hovering over the button (:hover).
In this iteration, active works but hover still shows the focus. You could consider something like :not(:active):not(:focus)
maybe.
Additional to this, the secondary and warning buttons show the focus state when actively pressing the buttons.
fe69862
to
eb8dbbd
Compare
eb8dbbd
to
5fcc9cb
Compare
fbfc36a
to
4e5d301
Compare
4e5d301
to
a90b71b
Compare
a90b71b
to
604beb5
Compare
Updates based on the changes in: alphagov/govuk-frontend#1315
Updates based on the changes in: alphagov/govuk-frontend#1315
Before:
After:
Browser testing:
Others tests:
Issues:
👉 Before: https://govuk-frontend-review.herokuapp.com/components/button
👉 After: https://govuk-frontend-review-pr-1315.herokuapp.com/components/button
Closes #1305