Skip to content

Commit

Permalink
Fix wrapping of long lines of text in summary list
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Jan 31, 2019
1 parent 62d3de3 commit a680f22
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@

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

- Fix wrapping of long lines of text in summary list

Thanks to [@MoJ-Longbeard](https://github.com/MoJ-Longbeard) for raising the issue.

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

## 2.6.0 (Feature release)

🆕 New features:
Expand Down
8 changes: 7 additions & 1 deletion src/components/summary-list/_summary-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,16 @@
}
}

.govuk-summary-list__key,
.govuk-summary-list__value {
// sass-lint:disable no-duplicate-properties
word-break: break-all; // Automatic word breaks
word-break: break-word; // WebKit/Blink only
}

.govuk-summary-list__key {
margin-bottom: govuk-spacing(1);
@include govuk-typography-weight-bold;
word-break: break-word;
@include govuk-media-query($from: tablet) {
width: 30%;
}
Expand Down
20 changes: 20 additions & 0 deletions src/components/summary-list/summary-list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,26 @@ examples:
text: Quick
- href: '#'
text: Erase
- key:
text: Long website address
value:
html: |
<a class="govuk-link" href="https://cs.wikipedia.org/wiki/Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch">https://cs.wikipedia.org/wiki/Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch</a>
actions:
items:
- href: '#'
text: Change
visuallyHiddenText: long website address
- key:
text: Long email address
value:
html: |
<a class="govuk-link" href="mailto:webmaster@llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch.com">webmaster@llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch.com</a>
actions:
items:
- href: '#'
text: Change
visuallyHiddenText: long email address
- key:
text: Pneumonoultramicroscopicsilicovolcanoconiosis
value:
Expand Down

0 comments on commit a680f22

Please sign in to comment.