made words break when too long in facet labels #960
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a word is too long in the facet labels, it causes its container to explode into the main content when the browser window is narrow. This PR fixes that by allowing the browser to break some words onto the next line.
In the images below I've placed a long word in the label that starts with G.
Before
Chrome
Note the totals that have escaped
![before-chrome](https://cloud.githubusercontent.com/assets/74879/3738561/4003cf44-1742-11e4-9cf6-05307d99b3ce.png)
After
Chrome
Once Chrome supports the
![after-chrome](https://cloud.githubusercontent.com/assets/74879/3738595/854c8fdc-1742-11e4-88a1-dd01e2fe2ad0.png)
hyphen
directive, we should get a nice hyphen for words that are broken (this hyphen isn't included when copying the text).Safari
Firefox
IE9
The label has a box around it because it was selected in the dom tree; it won't show up normally.
![after-ie9](https://cloud.githubusercontent.com/assets/74879/3738605/9c3833d6-1742-11e4-868d-510719b23f64.png)