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

Prevent wrapping of individual date inputs #1257

Closed
Closed
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@

([PR #1265](https://github.com/alphagov/govuk-frontend/pull/1265))

- Prevent wrapping of individual date inputs

Date inputs should group together as if they're a single field, this fix keeps them together using `white-space: nowrap`.

([PR #1257](https://github.com/alphagov/govuk-frontend/pull/1257))

## 2.9.0 (Feature release)

🆕 New features:
Expand Down
6 changes: 5 additions & 1 deletion src/components/date-input/_date-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@
@include govuk-clearfix;
// font-size: 0 removes whitespace caused by inline-block
font-size: 0;
white-space: nowrap;
}

.govuk-date-input__item {
display: inline-block;
margin-right: govuk-spacing(4);
margin-bottom: 0;
}

.govuk-date-input__item + .govuk-date-input__item {
margin-left: govuk-spacing(4);
}

.govuk-date-input__label {
display: block;
}
Expand Down