зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1496119 [wpt PR 13338] - [css-text] Trailing ideographic white-space, a=testonly
Automatic update from web-platform-tests[css-text] Trailing ideographic white-space (#13338) Relates to https://github.com/w3c/csswg-drafts/issues/2500 -- wpt-commits: 85746ce0c5b8e8403c0238af6469d7177ed15c49 wpt-pr: 13338
This commit is contained in:
Родитель
3483e65f44
Коммит
482d3835d9
|
@ -0,0 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS test reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
|
||||
<p>Test passes if the characters below are arranged in a square and if there is no red.
|
||||
<div>ああ<br>ああ</div>
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS test reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<style>
|
||||
div { white-space: pre; }
|
||||
span { background: blue; }
|
||||
</style>
|
||||
|
||||
<p>Test passes if the characters below are arranged in a square and if there is a blue rectangle at the end of the first line.
|
||||
<div>ああ<span> </span><br>ああ</div>
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS test reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<style>
|
||||
div { white-space: pre; }
|
||||
span { background: blue; }
|
||||
</style>
|
||||
|
||||
<p>Test passes if the characters below are arranged in a square and if there is a blue rectangle at the end of the first line.
|
||||
<div>ああ<span>      </span><br>ああ</div>
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS test reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<style>
|
||||
div { white-space: pre; }
|
||||
span {
|
||||
background: blue;
|
||||
|
||||
/* to make the span go under the right border */
|
||||
z-index:-1;
|
||||
position: relative;
|
||||
}
|
||||
aside {
|
||||
display: inline-block;
|
||||
width: 0.5em;
|
||||
border-right: 1em white solid;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if the characters below are arranged in a square and if there is a blue rectangle at the end of the first line.
|
||||
<div>ああ<aside><span> </span></aside><br>ああ</div>
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: ideographic space at the end of line must be removed</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/trailing-ideographic-space-001-ref.html">
|
||||
<meta name="assert" content="An ideographic space (U+3000) at the end of the line must be removed.">
|
||||
<style>
|
||||
div { width: 2em; }
|
||||
span { background: red; } /* If the space hangs instead of being removed, there will be red */
|
||||
</style>
|
||||
|
||||
<p>Test passes if the characters below are arranged in a square and if there is no red.
|
||||
<div>ああ<span> </span>ああ</div>
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: sequence of spaces and ideographic spaces at the end of line must be removed</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/trailing-ideographic-space-001-ref.html">
|
||||
<meta name="assert" content="An sequence ideographic space (U+3000) and regular spaces at the end of the line must be removed.">
|
||||
<style>
|
||||
div { width: 2em; }
|
||||
span { background: red; } /* If the space hangs instead of being removed, there will be red */
|
||||
</style>
|
||||
|
||||
<p>Test passes if the characters below are arranged in a square and if there is no red.
|
||||
<div>ああ<span>      </span>ああ</div>
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved ideographic space at the end of line must hang</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/trailing-ideographic-space-003-ref.html">
|
||||
<link rel="match" href="reference/trailing-ideographic-space-alt-003-ref.html">
|
||||
<meta name="assert" content="An ideographic space (U+3000) at the end of the line must hang if white-space preserves spaces.">
|
||||
<style>
|
||||
div {
|
||||
width: 2.5em;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
span { background: blue; } /* If the space is removed instead of hanging, there will be no blue box*/
|
||||
</style>
|
||||
|
||||
<p>Test passes if the characters below are arranged in a square and if there is a blue rectangle at the end of the first line.
|
||||
<div>ああ<span> </span>ああ</div>
|
||||
|
||||
<!--
|
||||
We're using a 2.5em width and two references, instead of 2em and just the first one,
|
||||
because in addition to requiring the spaces to hang,
|
||||
the spec allows, but does not require, browsers to visually collapse the advance widths of characters that overflow.
|
||||
In browsers that don't do that, the whole sequence of preserved spaces will be visible, and the first ref will be matched.
|
||||
In browsers that do, only the first 0.5em worth of space will be preserved, and the second ref will match.
|
||||
-->
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved sequences of spaces and ideographic spaces at the end of line must hang</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/trailing-ideographic-space-004-ref.html">
|
||||
<link rel="match" href="reference/trailing-ideographic-space-alt-003-ref.html">
|
||||
<meta name="assert" content="An sequence ideographic space (U+3000) and regular spaces at the end of the line must hang if white-space preserves spaces.">
|
||||
<style>
|
||||
div {
|
||||
width: 2.5em;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
span { background: blue; } /* If the spaces are removed instead of hanging, there will be no blue box*/
|
||||
</style>
|
||||
|
||||
<p>Test passes if the characters below are arranged in a square and if there is a blue rectangle at the end of the first line.
|
||||
<div>ああ<span>      </span>ああ</div>
|
||||
|
||||
<!--
|
||||
We're using a 2.5em width and two references, instead of 2em and just the first one,
|
||||
because in addition to requiring the spaces to hang,
|
||||
the spec allows, but does not require, browsers to visually collapse the advance widths of characters that overflow.
|
||||
In browsers that don't do that, the whole space will be visible, and the first ref will be matched.
|
||||
In browsers that do, only the first 0.5em worth of space will be preserved, and the second ref will match.
|
||||
-->
|
Загрузка…
Ссылка в новой задаче