Skip to content

Commit

Permalink
Add extra letter spacing modifier for inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
36degrees committed May 18, 2021
1 parent c14d6c9 commit 80e6bc4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/govuk/components/input/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
}
}

.govuk-input--extra-letter-spacing {
@include govuk-font(false, $tabular: true);
letter-spacing: .05em;
}

// The ex measurements are based on the number of W's that can fit inside the input
// Extra space is left on the right hand side to allow for the Safari prefill icon
// Linear regression estimation based on visual tests: y = 1.76 + 1.81x
Expand Down
6 changes: 6 additions & 0 deletions src/govuk/components/input/input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,12 @@ examples:
text: £
suffix:
text: per item
- name: with extra letter spacing
data:
label:
text: National insurance number
classes: govuk-input--width-30 govuk-input--extra-letter-spacing
value: QQ 12 34 56 C

# Hidden examples are not shown in the review app, but are used for tests and HTML fixtures
- name: classes
Expand Down

0 comments on commit 80e6bc4

Please sign in to comment.