Skip to content
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

Remove the first letter modifier from the tag component #3731

Merged
merged 1 commit into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ The design of the tag component has changed to improve accessibility and readabi
Text within the tag is no longer bold and uppercase with extra letter spacing, and is
instead regular 19px text. Due to this, there may be changes to the width of existing tags.

We now longer transform the content of tags to be uppercase automatically and instead recommend the content of tags be lower case with the first word in a tag's content be capitalised. Please check that the contents of tags and tags within phase banners in your service are using the correct capitalisation.

The colours have also changed to make them more distinguishable from buttons.

This change was made in [pull request #3502: Tag design changes](https://github.com/alphagov/govuk-frontend/pull/3502).
This change was made in:

- [pull request #3502: Tag design changes](https://github.com/alphagov/govuk-frontend/pull/3502).
- [pull request #3731: Remove the first letter modifier from the tag component](https://github.com/alphagov/govuk-frontend/pull/3731)

#### Added inverse modifier for buttons on dark backgrounds

Expand Down
9 changes: 0 additions & 9 deletions packages/govuk-frontend/src/govuk/components/tag/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@
}
}

// Previously the whole tag was transformed to UPPERCASE. We’ve since decided to switch
// to title case to improve readability. The first letter is uppercased to ease the transition,
// as the text may be all lowercase within the HTML itself.
//
// 'capitalize' is used instead of 'uppercase' as a workaround for a spacing bug in Firefox.
.govuk-tag::first-letter {
text-transform: capitalize;
}

.govuk-tag--grey {
color: govuk-shade(govuk-colour("dark-grey"), 50%);
background-color: govuk-tint(govuk-colour("dark-grey"), 85%);
Expand Down