Repository navigation
[css-text-3] Add test for intrinsic sizing and overflow-wrap - #11366
Conversation
This test goes toghether with the spec changes for w3c/csswg-drafts#2682
| <title>CSS Text Test: overflow-wrap: break-word and intrinsic sizing</title> | ||
| <link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/"> | ||
| <link rel="help" href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property"> | ||
| <meta name="flags" content=""> |
There was a problem hiding this comment.
What does it mean this empty flags tag ?
There was a problem hiding this comment.
it means that none of the possible flags listed in https://web-platform-tests.org/writing-tests/css-metadata.html apply.
Not including the flags meta at all might mean that too, or it might mean that the author forgot to consider the flags. So I prefer to include empty flags rather than leaving them out.
| <link rel="match" href="reference/overflow-wrap-min-content-size-001-ref.html"> | ||
| <meta name="assert" content="Soft wrap opportunities introduced by overflow-wrap:break-word **are** considered when calculating min-content intrinsic sizes."> | ||
| <style> | ||
| table { |
There was a problem hiding this comment.
I think the 'table' object here is a distraction. Perhaps i'm not understanding it properly, but at least in chrome, the max-width properly is not applied and 'table' layout just honors the min-content to determine its width. Wouldn't be better to use an inline-block, a float or just a div with 'min-content' width ?
There was a problem hiding this comment.
This is a response to this comment as well as the next one:
Yes, with width: min-content on the div directly, without using a table, would achieve the goal of this test, and be simpler. However, width: min-content is not yet widely supported, and tests should not depend on features that are not yet stable.
Using a table, and forcing it to be as small as possible will achieve min-content sizing of the div in all browsers.
I'll add a comment to the test saying that.
| <style> | ||
| table { | ||
| overflow-wrap: break-word; | ||
| max-width: 0; |
There was a problem hiding this comment.
Is the max-width really relevant for this test ? If the purpose of the test is to evaluate how soft-breaking opportunities account for the min-content width, wouldn't be enough to use width: min-content ?
This test goes toghether with the spec changes for w3c/csswg-drafts#2682