Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-text] break-all opportunities to avoid breaking before first space #16843

Merged
merged 1 commit into from
May 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions css/css-text/white-space/break-spaces-010.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: white-space: break-spaces</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces">
<meta name="flags" content="ahem">
<link rel="match" href="reference/white-space-break-spaces-005-ref.html">
<meta name="assert" content="break-spaces only allows breaking after a white space, hence, a preserved white space may overflow.">
<style>
div {
font: 25px/1 Ahem;
}
.fail {
position: absolute;
color: red;
z-index: -1;
}
span { color: green; }
.test {
color: green;
width: 4ch;

white-space: break-spaces;
}
</style>

<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div class="fail">XXXX<br><span>X</span>XX<span>X<br>XXXX<br>XXXX</span></div>
<div class="test">XXXX XX</div>
2 changes: 1 addition & 1 deletion css/css-text/word-break/word-break-break-all-017.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
}
</style>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div class="red">X<br>XX X<br>X X <br>XX X</div>
<div class="red">X X <br>X X <br>X X <br>XX X</div>
<div class="test">X XX XX X XX X</div>