Re: [csswg-drafts] [css-text] Prevent line breaking after explicit hyphens (#3434)

> Hi. I came across this thread as I need to transform this: ![image](https://user-images.githubusercontent.com/5755214/124717292-0c166180-df16-11eb-9b74-67e6955e8406.png)
> 
> To this: ![image](https://user-images.githubusercontent.com/5755214/124717577-50a1fd00-df16-11eb-9d12-b8452325ac3a.png)
> 
> And I am not willing to use any of the workarounds (like adding extra HTML wrapper/element or using non-breaking hyphen), as my texts are coming from JSON translation files, and I'm not considering them as HTML.
> 
> My first go-to thought was `word-break` property.

Excellent illustration of what I believe @hftf is talking about. This is also exactly what I am trying to accomplish. I tried `white-space: nowrap`, but it doesn't do what I expected. Then I found this post and reading the whole thread explained a lot. Thanks for the graphic!

-- 
GitHub Notification of comment by codewizard13
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3434#issuecomment-1170097239 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 29 June 2022 15:05:22 UTC