Skip to content

Commit

Permalink
Explain how fixed widths are calculated
Browse files Browse the repository at this point in the history
Based on backlog conversation here: alphagov/govuk-design-system-backlog#51 (comment)
  • Loading branch information
timpaul authored Sep 29, 2020
1 parent c632342 commit 52802fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/text-input/index.md.njk
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ If you want to make the input smaller, you can either use a fixed width input, o

Use fixed width inputs for content that has a specific, known length. Postcode inputs should be postcode-sized, telephone number inputs should be telephone number-sized.

The widths are consistent across a range of browsers and include additional padding to accomodate icons embedded into the input (for example to show or generate a password).

On fixed width inputs, the width will remain fixed on all screens unless it is wider than the viewport, in which case it will shrink to fit.

{{ example({group: "components", item: "text-input", example: "input-fixed-width", html: true, nunjucks: true, open: false, size: "l"}) }}
Expand Down

0 comments on commit 52802fb

Please sign in to comment.