Skip to content

Commit

Permalink
Update _summary-list.scss
Browse files Browse the repository at this point in the history
[PR alphagov#1169](alphagov#1169) added in some CSS:
- ``word-break: break-word;``, followed by
- ``word-break: break-all;``

``word-break: break-word;`` is the favoured behaviour, but isn't fully supported.  
``word-break: break-all;`` is the fallback behaviour, it sometimes results in unfavourable wrapping mid-word.  

The order for this CSS needs to be changed to, otherwise the less favourable `break-all` takes precedence.
```CSS
word-break: break-all;
word-break: break-word;
```

**caniuse** said:
> Chrome, Safari and other WebKit/Blink browsers also support the unofficial break-word value

The implication here being that it is not fully supported, so ``word-break: break-all;`` is still needed as a fallback.

Discussed with [Colin Rotherham](https://github.com/colinrotherham)
  • Loading branch information
MalcolmVonMoJ authored Feb 14, 2019
1 parent 550cf5f commit d2bbd4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/summary-list/_summary-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
.govuk-summary-list__value {
// sass-lint:disable no-duplicate-properties
// Automatic wrapping for unbreakable text (e.g. URLs)
word-break: break-word; // WebKit/Blink only
word-break: break-all; // Standards
word-break: break-word; // Chrome/Safari/WebKit/Blink only
}

.govuk-summary-list__key {
Expand Down

0 comments on commit d2bbd4f

Please sign in to comment.