-
Notifications
You must be signed in to change notification settings - Fork 347
Make button text on new colours more legible #6415
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
Draft
selfthinker
wants to merge
1
commit into
main
Choose a base branch
from
button-legibility
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 tasks
Stylesheets changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
index d7c4e7dd6..86155eb64 100644
--- a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
+++ b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
@@ -1893,7 +1893,9 @@
color: #fff;
background-color: #11875a;
box-shadow: 0 2px 0 #09442d;
+ letter-spacing: .005em;
text-align: center;
+ text-shadow: #09442d 0 0 10px;
vertical-align: top;
cursor: pointer;
-webkit-appearance: none
@@ -1950,7 +1952,8 @@
.govuk-button:focus {
border-color: #fd0;
outline: 3px solid transparent;
- box-shadow: inset 0 0 0 1px #fd0
+ box-shadow: inset 0 0 0 1px #fd0;
+ text-shadow: none
}
.govuk-button:focus:not(:active):not(:hover) {
@@ -1991,7 +1994,8 @@
.govuk-button--secondary {
background-color: #f3f3f3;
- box-shadow: 0 2px 0 #858686
+ box-shadow: 0 2px 0 #858686;
+ text-shadow: none
}
.govuk-button--secondary,
@@ -2012,7 +2016,8 @@
.govuk-button--warning {
background-color: #ca3535;
- box-shadow: 0 2px 0 #651b1b
+ box-shadow: 0 2px 0 #651b1b;
+ text-shadow: #651b1b 0 0 10px
}
.govuk-button--warning,
@@ -2033,7 +2038,8 @@
.govuk-button--inverse {
background-color: #fff;
- box-shadow: 0 2px 0 #0f385c
+ box-shadow: 0 2px 0 #0f385c;
+ text-shadow: none
}
.govuk-button--inverse,
Action run for 7c07646 |
Other changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/components/button/_index.scss b/packages/govuk-frontend/dist/govuk/components/button/_index.scss
index 0414d8297..32eb979f7 100644
--- a/packages/govuk-frontend/dist/govuk/components/button/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/button/_index.scss
@@ -77,7 +77,9 @@ $govuk-inverse-button-text-colour: $govuk-brand-colour !default;
color: $govuk-button-text-colour;
background-color: $govuk-button-colour;
box-shadow: 0 $button-shadow-size 0 $govuk-button-shadow-colour; // s0
+ letter-spacing: 0.005em;
text-align: center;
+ text-shadow: $govuk-button-shadow-colour 0 0 10px;
vertical-align: top;
cursor: pointer;
-webkit-appearance: none;
@@ -114,6 +116,7 @@ $govuk-inverse-button-text-colour: $govuk-brand-colour !default;
border-color: $govuk-focus-colour;
outline: $govuk-focus-width solid transparent;
box-shadow: inset 0 0 0 1px $govuk-focus-colour;
+ text-shadow: none;
}
&:focus:not(:active):not(:hover) {
@@ -171,6 +174,7 @@ $govuk-inverse-button-text-colour: $govuk-brand-colour !default;
.govuk-button--secondary {
background-color: $govuk-secondary-button-colour;
box-shadow: 0 $button-shadow-size 0 $govuk-secondary-button-shadow-colour;
+ text-shadow: none;
&,
&:link,
@@ -192,6 +196,7 @@ $govuk-inverse-button-text-colour: $govuk-brand-colour !default;
.govuk-button--warning {
background-color: $govuk-warning-button-colour;
box-shadow: 0 $button-shadow-size 0 $govuk-warning-button-shadow-colour;
+ text-shadow: $govuk-warning-button-shadow-colour 0 0 10px;
&,
&:link,
@@ -213,6 +218,7 @@ $govuk-inverse-button-text-colour: $govuk-brand-colour !default;
.govuk-button--inverse {
background-color: $govuk-inverse-button-colour;
box-shadow: 0 $button-shadow-size 0 $govuk-inverse-button-shadow-colour;
+ text-shadow: none;
&,
&:link,
Action run for 7c07646 |
📋 StatsFile sizes
No changes to module sizes. Action run for 7c07646 |
7 tasks
763496c to
7c07646
Compare
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is implementing the idea to enhance the legibility of the text on the buttons with the new green and red via
text-shadow. This is still in the experimental phase so we can see how this looks in more context of pages and button groups in the review app.