зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1496076 [wpt PR 13333] - [css-text] Check hanging of trailing white-space with pre-wrap, a=testonly
Automatic update from web-platform-tests[css-text] Check hanging of trailing white-space with pre-wrap -- Merge pull request #13333 from frivoal/text-3116 [css-text] Check hanging of trailing white-space with pre-wrap -- wpt-commits: 0c431cd14c54327c58909c0671149c518d0e0438, 9e3c344cd052bc7ba0e957f3a343a09f09e29815 wpt-pr: 13333
This commit is contained in:
Родитель
96a4f1100c
Коммит
7a75eb08cd
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS Text test: hanging trailing spaces with white-space:pre-wrap</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
|
||||
<style>
|
||||
div {
|
||||
white-space: pre-wrap;
|
||||
font-family: monospace;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>This test passes if the 4 letters below are verticaly aligned.
|
||||
|
||||
<div> P</div>
|
||||
<div> A</div>
|
||||
<div> S</div>
|
||||
<div> S</div>
|
|
@ -0,0 +1,8 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS test Reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
|
||||
<p>This test passes if you can see the word PASS below, without any extra spaces.
|
||||
|
||||
<div>PASS</div>
|
|
@ -0,0 +1,31 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS Text test: hanging trailing spaces with white-space:pre-wrap</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-001-ref.html">
|
||||
<meta name="assert" content="Preserved white space at the end of the line is hanged when white-space is pre-wrap.">
|
||||
|
||||
<style>
|
||||
div {
|
||||
white-space: pre-wrap;
|
||||
font-family: monospace;
|
||||
}
|
||||
div:nth-of-type(1),
|
||||
div:nth-of-type(2) {
|
||||
width: 5ch;
|
||||
text-align: right;
|
||||
}
|
||||
div:nth-of-type(3),
|
||||
div:nth-of-type(4) {
|
||||
width: 9ch;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>This test passes if the 4 letters below are verticaly aligned.
|
||||
|
||||
<div>P</div>
|
||||
<div>A </div>
|
||||
<div>S</div>
|
||||
<div>S </div>
|
|
@ -0,0 +1,20 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS Text test: intrinsic maximum sizing of trailing spaces with white-space:pre-wrap</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-002-ref.html">
|
||||
<meta name="assert" content="Preserved white space at the end of the line is hanged when white-space is pre-wrap, and therefore does not count when computing the (maximum) intrinsic size.">
|
||||
|
||||
<style>
|
||||
span {
|
||||
display: inline-block;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
#s1 { text-align: right; }
|
||||
#s2 { text-align: center; }
|
||||
</style>
|
||||
|
||||
<p>This test passes if you can see the word PASS below, without any extra spaces.
|
||||
|
||||
<div><span id=s1>P </span><span id=s2>A </span>SS</div>
|
|
@ -0,0 +1,27 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS Text test: intrinsic minimum sizing of trailing spaces with white-space:pre-wrap</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-002-ref.html">
|
||||
<meta name="assert" content="Preserved white space at the end of the line is hanged when white-space is pre-wrap, and therefore does not count when computing the (minimum) intrinsic size.">
|
||||
|
||||
<style>
|
||||
/* Make the table invisible */
|
||||
table { border-collapse: collapse; }
|
||||
td { padding: 0; }
|
||||
|
||||
/* for the content of the table to be sized to their mininum intrinsic size */
|
||||
table { width: 0; }
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
#s1 { text-align: right; }
|
||||
#s2 { text-align: center; }
|
||||
</style>
|
||||
|
||||
<p>This test passes if you can see the word PASS below, without any extra spaces.
|
||||
|
||||
<table><td><span id=s1>P </span><td><span id=s2>A </span><td>SS</table>
|
Загрузка…
Ссылка в новой задаче