Skip to content

Commit

Permalink
Merge pull request #3731 from alphagov/remove-tag-first-letter-capita…
Browse files Browse the repository at this point in the history
…lise

Remove the first letter modifier from the tag component
  • Loading branch information
owenatgov authored Jun 2, 2023
2 parents a41223c + 10b4f27 commit 5fe6699
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
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

0 comments on commit 5fe6699

Please sign in to comment.