Re: [csswg-drafts] [css-text-4] add 'avoid' to text-wrap-wrap (#9448)

> I guess it's about which thing would be more annoying: using a new property and having to set it for all the descendants you wanted to apply it to, versus needing to explicitly undo that for descendants that shouldn't be avoid.

I suspect this is a misunderstanding of how `wrap-inside: avoid` works. You do not need to set it for all the descendants of an element you want it to apply to.

Say you have something like this:
```markup
<div>…<em>…<span>…</span>…</em>…</div>
```
If you apply `wrap-inside: avoid` to the `<em>` element, then wrapping is disabled for the whole element, including descendants like the `<span>`. Unless that would overflow, in which case you give up, and wrap normally.

If you apply `wrap-inside: avoid` to the `<em>` and the `<span>` element, then wrapping is disabled for the whole `<em>` element, including descendants like the `<span>`. Unless the `<em>` would overflow, in which case you give up, and wrap normally for the parts of the `<em>` outside the `<span>`, but you continue to disable wrapping within the `<span>`. Unless *that* would overflow too.

In a way, this is similar to text-decoration: it's not inherited, but it covers the whole subtree rooted at the element you target.

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


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

Received on Friday, 13 October 2023 02:54:07 UTC