-
Notifications
You must be signed in to change notification settings - Fork 324
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 'secondary' and 'warning' action buttons #1207
Conversation
Related discussion on secondary buttons: |
Looks good @dashouse. I'd probably aim for the border bottom on the grey button to meet 4.5:1 contrast - so possibly using |
Here is the code for the buttons we use on GOV.UK |
Tiny nitpick but I don't think the outlined buttons need to have the thicker bottom border. On Content Publisher, we increased the height of the button so the total height would be the same as the filled version. And then had the same border all the way around. |
Hey @soniaturcotte, there was some concern that against our text input style the only signifiers of the button were colour and centred text. This was an attempt to differentiate them a bit further but it's also just a best guess on our part. |
@dashouse Do you have a screenshot of how these alternative buttons look alongside text inputs? Edited: Screenshot from alphagov/govuk-design-system-backlog#154 |
dbdae8d
to
1a61f96
Compare
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.
These look ace @dashouse.
I've added a few comments. Apart from fixing the secondary button styles for links, they're mostly just suggestions 🙂
$govuk-button-hover-colour: darken($govuk-button-colour, 5%); | ||
$govuk-button-shadow-colour: darken($govuk-button-colour, 15%); | ||
// Primary button variables | ||
$govuk-button-colour: #00823b; // sass-lint:disable no-color-literals |
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.
Just wondered why we were using colour literals here? Should it not be a green from the colour platte?
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.
Nope, the buttons have been their own 'button colour' green for a long time. It's something we're planning to fix with the palette change, but it shouldn't change in this PR.
aed472c
to
b09c925
Compare
b09c925
to
4eb4940
Compare
4eb4940
to
afb9b18
Compare
I think this is ready for review now – top work @dashouse 👍 |
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.
Awesome work and I like how the new shade/tint mixins are name-spaced.
Dangit, changelog. |
Relates to alphagov/govuk-design-system-backlog#154 |
- Add new secondary and warning button variants ([PR #1207](alphagov/govuk-frontend#1207)) - Add new govuk-shade and govuk-tint functions for creating shades and tints of colours. ([PR #1207](alphagov/govuk-frontend#1207)) - Add support for custom row classes on the summary list component (including support for some rows without action links) ([PR #1259](alphagov/govuk-frontend#1259)) - Ensure fieldset never exceeds max-width This fix ensures that both WebKit/Blink and Firefox are prevented from expanding their fieldset widths to the content's minimum size. This was preventing `max-width: 100%` from being applied to select menus inside a fieldset. See discussion in ["Reset your fieldset"](https://thatemil.com/blog/2015/01/03/reset-your-fieldset/) and raised by [issue #1264](alphagov/govuk-frontend#1264) ([PR #1269](alphagov/govuk-frontend#1269)) - Add various fixes to the summary list component: 1. Fixes the 1px row height change when borders are removed Padding is now adjusted by 1px instead 2. Fixes the text alignment when the actions column isn't added So the key column always stays at 30% width ([PR #1259](alphagov/govuk-frontend#1259)) https://github.com/alphagov/govuk-frontend/releases/tag/v2.11.0
This PR:
tint
andshade
mix function - This is more controllable thandarken
andlighten
shade
(Therefore a slight change to the hover colour)Secondary
I need to consult with this design regarding WCAG 2.1 non-text contrast. The text and the shadow meet contrast which I believe will be enough (the background of the button does not).
Warning