Re: [csswg-drafts] [css-text-4] Hyphenate only overflowing words? (#616)

So, we have 3 proposals, the two listed in https://github.com/w3c/csswg-drafts/issues/616#issuecomment-1368091416, and a third by @jfkthame, which I understand to be:

Syntaxes proposed so far (properties not listed assumed at initial value):

| | `overflow-wrap` | `hyphens` | `hyphenate-limit-zone` |
|-|-|-|-|
| Auto Overflow hyphenation|  `overflow-wrap: hyphenate;`| `hyphens: overflow;` | `hyphenate-limit-zone: 100%;`<br>`hyphens: auto` |
| Manual Overflow hyphenation | `overflow-wrap: hyphenate manual;`<br>`hyphens: none;`|`hyphens: overflow manual;`|`hyphenate-limit-zone: 100%;`|
| Overflow hyphenation,<br>fallback to wrapping| `overflow-wrap: hyphenate break-word;` | `hyphens: overflow;`<br>`overflow-wrap: break-word;` | `hyphenate-limit-zone: 100%;`<br>`overflow-wrap: break-word;` |

The `overflow-wrap` approach:
<dl>
<dt>Pro
<dd>All options about what to do in case of overflow are in one property.
<dd>lets you have a choice of manual vs none for hyphenation when not overflowing on top of turning auto hyphenation when overflowing
<dt>Con:
<dd>would require `overflow-wrap` to acquire multiple keywords related to hyphenation, as we cannot use `hyphens: auto` vs `hyphens: manual` to chose the type of overflow hyphenation, since that already controls non-overflow hyphenation.
</dl>

The `hyphens` approach :
<dl>
<dt>Pro:
<dd>Only needs to add a signle keyword to hyphens about overflowing
<dt>Con:
<dd>Doesn't lets you have a choice of manual vs none for hyphenation when not overflowing on top of turning auto hyphenation when overflowing
</dl>

The `hyphenate-limit-zone` approach:
<dl>
<dt>Pro
<dd>Falls out of a property we already plan to have, nothing else is needed.
<dt>Con:
<dd>(Subjective) Not an obvious place to look for this control
<dd>Doesn't lets you have a choice of manual vs none for hyphenation when not overflowing on top of turning auto hyphenation when overflowing
</dl>

Also, in any case, we might need a control to decide if hyphenation in case of overflow affects the minimum intrinsic size, as I think there's use cases for both: the general answer should be no, but inside tables the opposite is usually true, and for flex or grid, I think it might depend…

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


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

Received on Monday, 25 September 2023 08:25:48 UTC