<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: min-content sizing and white-space: pre-wrap</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-anywhere">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#propdef-white-space">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-wrap">
<link rel="match" href="reference/overflow-wrap-min-content-size-009-ref.html">
<meta name="assert" content="Using 'overflow-wrap:anywhere' doesn't prevent the tabs sequence to hang (inconditionally) , honoring 'white-space: pre-wrap' hence glyphs **are not** considered when calculating min-content intrinsic sizes.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<style>
div {
    font: 20px/1 Ahem;
}
.test {
    color: green;
    background: red;
    z-index: -1;

    width: min-content;
    white-space: pre-wrap;
    overflow-wrap: anywhere
}
.ref {
    position: absolute;
    background: green;
    color: transparent;
}
</style>

<p>Test passes if there is a green box below and no red.
<div class="ref"><br><br>X</div>
<div class="test">&#9;&#9;<span>XX</span></div>
