mirror of
https://github.com/servo/servo.git
synced 2025-08-14 18:05:36 +01:00
Update web-platform-tests to revision c9633200e9c3d5524dca096e8c23c8eb4a94e495
This commit is contained in:
parent
049527872e
commit
902c03b511
123 changed files with 2587 additions and 569 deletions
|
@ -13,6 +13,9 @@
|
|||
padding: 1px;
|
||||
background: black;
|
||||
}
|
||||
#reference {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id="justify"><span></span></div>
|
||||
|
@ -29,5 +32,5 @@ test(function() {
|
|||
const ref_rect = ref_element.firstElementChild.getBoundingClientRect();
|
||||
assert_equals(justify_rect.left, ref_rect.left);
|
||||
assert_equals(justify_rect.right, ref_rect.right);
|
||||
}, 'Left and right edges of empty inlines should align.');
|
||||
}, 'content that cannot be justified should be centered when text-align-last is justify');
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>pre(white-space's one of values) crash if there is no available width</title>
|
||||
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=999863">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>test(()=>{})</script>
|
||||
</head>
|
||||
<body>
|
||||
abc<b style="margin-left: 100%; white-space: pre;">def</b>
|
||||
<div>
|
||||
<li>
|
||||
<a href="dummy">success if does not crash</a>
|
||||
</li>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,10 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with right alignement</title>
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of soft-wrapped lines and white-space:pre-wrap with right alignement</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/pre-wrap-012-ref.html">
|
||||
<meta name="assert" content="When white-space is pre-wrap, spaces at the end of the line hang, so they do not have any effect when right-aligning.">
|
||||
<meta name="assert" content="When white-space is pre-wrap, spaces at the end of soft-wrapped lines hang, so they do not have any effect when right-aligning.">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
|
@ -22,6 +22,5 @@ div {
|
|||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<div>XX 
|
||||
XX </div>
|
||||
<div>XX XX</div>
|
||||
</body>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with center alignement</title>
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of soft-wrapped lines and white-space:pre-wrap with center alignement</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/pre-wrap-013-ref.html">
|
||||
<meta name="assert" content="When white-space is pre-wrap, spaces at the end of the line hang, so they do not have any effect when centering.">
|
||||
<meta name="assert" content="When white-space is pre-wrap, spaces at the end of soft-wrapped lines hang, so they do not have any effect when centering.">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
|
@ -22,6 +22,5 @@ div {
|
|||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<div>XX 
|
||||
XX </div>
|
||||
<div>XX XX</div>
|
||||
</body>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with justification</title>
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of soft-wrapped lines and white-space:pre-wrap with justification</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/pre-wrap-014-ref.html">
|
||||
<meta name="assert" content="When white-space is pre-wrap, spaces at the end of the line hang, so they do not have any effect when justifying.">
|
||||
<meta name="assert" content="When white-space is pre-wrap, spaces at the end of soft-wrapped lines hang, so they do not have any effect when justifying.">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
|
@ -27,6 +27,6 @@ span {
|
|||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green rectangle</strong> and <strong>no red</strong>.</p>
|
||||
<div><span>X X</span> 
|
||||
X</div><!-- invisible last line, because justification works on non-last lines-->
|
||||
<div><span>X X</span> X</div>
|
||||
<!-- invisible last line, because justification works on non-last lines-->
|
||||
</body>
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: pre-wrap trailing spaces and max-content</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="When white-space is pre-wrap, trailing spaces spaces are taken into account for max-content">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
#red {
|
||||
position: absolute;
|
||||
z-index:-1;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: red;
|
||||
}
|
||||
#test {
|
||||
margin-left: -1em;
|
||||
font: 40px/1 Ahem;
|
||||
color: white;
|
||||
background: green;
|
||||
width: max-content;
|
||||
white-space: pre-wrap
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
|
||||
<div id=red></div>
|
||||
<div id=test>X </div>
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: pre-wrap spaces and centering</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/pre-wrap-018-ref.html">
|
||||
<meta name="assert" content="conditionally hanging white space at the end of lines with forced breaks provides symmetry with the start of the line">
|
||||
<style>
|
||||
div {
|
||||
font-size: 2rem;
|
||||
margin: 1rem;
|
||||
}
|
||||
#test {
|
||||
white-space: pre-wrap;
|
||||
width: 5ch;
|
||||
border: solid 1px;
|
||||
font-family: monospace;
|
||||
text-align: center;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#ref {
|
||||
white-space: pre;
|
||||
width: 5ch;
|
||||
border: solid 1px;
|
||||
font-family: monospace;
|
||||
}
|
||||
#ref span {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<p>Test passes if the two boxes below are identical.
|
||||
|
||||
<div id=test> 0 </div>
|
||||
<div id=ref> <span> 0 </span></div>
|
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: trailing pre-wrap spaces and hanging</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/pre-wrap-019-ref.html">
|
||||
<meta name="assert" content="trailing pre-wrap spaces hang at soft-wrapped lines, and hang conditionally before forced breaks.">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
font-size: 2rem;
|
||||
font-family: Ahem;
|
||||
width: 3ch;
|
||||
}
|
||||
#test1, #test2 {
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
}
|
||||
#test2 {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.ref {
|
||||
white-space: pre;
|
||||
color: red;
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<p>Test passes if there are green squares below and no red.
|
||||
|
||||
<div class=ref> 0 <br>0 0 <br>0 </div>
|
||||
<div id=test1> 0 0 0 0 </div>
|
||||
|
||||
<div class=ref> 0<br>0 0 <br> 0</div>
|
||||
<div id=test2> 0 0 0 0 </div>
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: trailing pre-wrap spaces and conditional hanging</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/pre-wrap-020-ref.html">
|
||||
<meta name="assert" content="trailing pre-wrap spaces hang conditionally before forced breaks, which is different from not hanging at all, as it doesn't cause wrapping at earlier opportunities.">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
font-size: 2rem;
|
||||
font-family: Ahem;
|
||||
width: 3ch;
|
||||
}
|
||||
#test {
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
}
|
||||
|
||||
.ref {
|
||||
white-space: pre;
|
||||
color: red;
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<p>Test passes if there are green rectangles below and no red.
|
||||
|
||||
<div class=ref>0 0<br>0 0</div>
|
||||
<div id=test>0 0 0 0 </div>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Test reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<style>
|
||||
div {
|
||||
font-size: 2rem;
|
||||
margin: 1rem;
|
||||
white-space: pre;
|
||||
width: 5ch;
|
||||
border: solid 1px;
|
||||
font-family: monospace;
|
||||
}
|
||||
span {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<p>Test passes if the two boxes below are identical.
|
||||
|
||||
<div> <span> 0 </span></div>
|
||||
<div> <span> 0 </span></div>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Test reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
font-size: 2rem;
|
||||
font-family: Ahem;
|
||||
width: 3ch;
|
||||
white-space: pre;
|
||||
color: green;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<p>Test passes if there are green squares below and no red.
|
||||
|
||||
<div class=ref> 0 <br>0 0 <br>0 </div>
|
||||
|
||||
<div class=ref> 0<br>0 0 <br> 0</div>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>test reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
font-size: 2rem;
|
||||
font-family: Ahem;
|
||||
width: 3ch;
|
||||
white-space: pre;
|
||||
color: green;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<p>Test passes if there are green rectangles below and no red.
|
||||
|
||||
<div>0 0<br>0 0</div>
|
|
@ -0,0 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Test reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<p>Test passes if there is <strong>no red</strong> below.</p>
|
|
@ -2,14 +2,13 @@
|
|||
<meta charset="utf-8">
|
||||
<title>test reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
color: transparent;
|
||||
font-family: Ahem;
|
||||
font-family: monospace;
|
||||
font-size: 50px;
|
||||
width: 3ch;
|
||||
height: 2ch;
|
||||
height: 2em;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -2,7 +2,19 @@
|
|||
<meta charset=utf-8>
|
||||
<title>CSS test Reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-family: Ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
#test { color: orange; }
|
||||
#ref { color: blue; }
|
||||
</style>
|
||||
|
||||
<p>This test passes if the letters below are spaced equally.
|
||||
<p>This test passes if the orange blocks below are vertically aligned with the blue ones.
|
||||
|
||||
<div>X X X X</div>
|
||||
<div id=test>X X X X</div>
|
||||
<div id=ref>X X X X</div>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with right alignement in a textarea</title>
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of soft-wrapped lines and white-space:pre-wrap with right alignement in a textarea</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="When white-space is pre-wrap, only spaces that overflow the line get collapsed or hanged, the ones that fit have an effect when right-aligning in a textarea.">
|
||||
<link rel="match" href="reference/pre-wrap-012-ref.html">
|
||||
<meta name="assert" content="When white-space is pre-wrap, only spaces at the end of soft-wrapped lines get collapsed or hanged, so they do not have any effect when right aligning.">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
textarea {
|
||||
|
@ -25,7 +25,7 @@ textarea {
|
|||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
background: linear-gradient(red, red) 1ch 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 3ch;
|
||||
text-align: right;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with center alignement in a textarea</title>
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of soft-wrapped line and white-space:pre-wrap with center alignement in a textarea</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="When white-space is pre-wrap, only spaces that overflow the line get collapsed or hanged, the ones that fit have an effect when centering in a textarea.">
|
||||
<link rel="match" href="reference/pre-wrap-013-ref.html">
|
||||
<meta name="assert" content="When white-space is pre-wrap, spaces at the end of soft-wrapped lines get collapsed or hanged, so they do not have any effect when centering.">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
textarea {
|
||||
|
@ -25,7 +25,7 @@ textarea {
|
|||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
background: linear-gradient(red, red) 0.5ch 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 3ch;
|
||||
text-align: center;
|
||||
|
@ -33,6 +33,5 @@ textarea {
|
|||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<textarea>XX 
|
||||
XX </textarea>
|
||||
<textarea>XX XX</textarea>
|
||||
</body>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with justification in a textarea</title>
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of soft-wrapped lines and white-space:pre-wrap with justification in a textarea</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="When white-space is pre-wrap, only spaces that overflow the line get collapsed or hanged, the ones that fit have an effect when justifying in a textarea.">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-014-ref.html">
|
||||
<meta name="assert" content="When white-space is pre-wrap, spaces at the end of a soft-wrapped line get collapsed or hanged, and don't influence justification.">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
textarea {
|
||||
|
@ -23,17 +23,15 @@ textarea {
|
|||
font-family: Ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
color: white;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
background: linear-gradient(red, red) 3ch 0/2ch 1ch no-repeat;
|
||||
|
||||
width: 3ch;
|
||||
width: 4ch;
|
||||
text-align: justify;
|
||||
text-justify: inter-character;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<textarea>X​X 
|
||||
X​X </textarea>
|
||||
<p>Test passes if there is <strong>no red</strong> below.</p>
|
||||
<textarea>X X X</textarea>
|
||||
</body>
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<meta name="flags" content="">
|
||||
<link rel="match" href="reference/white-space-intrinsic-size-004-ref.html">
|
||||
<meta name="assert" content="Preserved spaces at the end of the line do affect the intrinsic max-content size when white-space is pre-wrap, as hanging does not prevent contributing to the max-content size. The value of overflow-wrap makes no difference.">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<meta name="assert" content="Preserved spaces at the end of the line do affect the intrinsic max-content size when white-space is pre-wrap, as spaces before a forced break, at the end of un unwrapped line, only hanging conditionally, which does not prevent contributing to the max-content size. The value of overflow-wrap makes no difference.">
|
||||
<style>
|
||||
aside {
|
||||
float: left;
|
||||
|
@ -18,10 +17,10 @@ aside:last-of-type { overflow-wrap: break-word; }
|
|||
div {
|
||||
background: red;
|
||||
color: transparent;
|
||||
font-family: Ahem;
|
||||
font-family: monospace;
|
||||
font-size: 50px;
|
||||
width: 3ch;
|
||||
height: 2em;
|
||||
line-height: 1;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS Text test: hanging trailing spaces with white-space:pre-wrap</title>
|
||||
<title>CSS Text test: alignement and 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.">
|
||||
<meta name="assert" content="Preserved white space with pre-wrap at the end of a line ending with a forced line break conditionally hangs, so it does affect alignment.">
|
||||
|
||||
<style>
|
||||
div {
|
||||
white-space: pre-wrap;
|
||||
font-family: monospace;
|
||||
}
|
||||
div:nth-of-type(1),
|
||||
div:nth-of-type(2) {
|
||||
width: 5ch;
|
||||
width: 7ch;
|
||||
text-align: right;
|
||||
}
|
||||
div:nth-of-type(3),
|
||||
|
@ -25,7 +24,7 @@ div:nth-of-type(4) {
|
|||
|
||||
<p>This test passes if the 4 letters below are verticaly aligned.
|
||||
|
||||
<div>P</div>
|
||||
<div>A </div>
|
||||
<div>S</div>
|
||||
<div>S </div>
|
||||
<div> P</div>
|
||||
<div>A </div>
|
||||
<div> S </div>
|
||||
<div> S </div>
|
||||
|
|
|
@ -1,20 +1,28 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS Text test: intrinsic maximum sizing of trailing spaces with white-space:pre-wrap</title>
|
||||
<title>CSS Text test: intrinsic maximum sizing and alignment 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="Hanging preserved white space at the end of the line when white-space is pre-wrap has no effect on the max-content size.">
|
||||
|
||||
<meta name="assert" content="Preserved white space with white-space is pre-wrap at the end of the line before a forced-break only hangs conditionally, and therefore is included in the max-content size, and taken into account for alignemnt (since it doesn't actually hang in this situation).">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-family: Ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
span {
|
||||
display: inline-block;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
#s1 { text-align: right; }
|
||||
#s2 { text-align: center; }
|
||||
#test { color: orange; }
|
||||
#ref { color: blue; }
|
||||
</style>
|
||||
|
||||
<p>This test passes if the letters below are spaced equally.
|
||||
<p>This test passes if the orange blocks below are vertically aligned with the blue ones.
|
||||
|
||||
<div><span id=s1>X </span><span id=s2>X </span>X X</div>
|
||||
<div id=test><span id=s1>X </span><span id=s2> X </span> X X</div>
|
||||
<div id=ref>X X X X</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<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-003-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.">
|
||||
<meta name="assert" content="Preserved white space at the end of soft-wrapped lines is hanged when white-space is pre-wrap, and therefore does not count when computing the (minimum) intrinsic size.">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<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="match" href="reference/white-space-pre-wrap-trailing-spaces-004-ref.html">
|
||||
<meta name="assert" content="Preserved white space at the end of the line is hanged when white-space is pre-wrap.">
|
||||
<meta name="assert" content="Preserved white space at the end of a soft-wrapped line is hanged when white-space is pre-wrap.">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
|
||||
<style>
|
||||
div {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<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="match" href="reference/white-space-pre-wrap-trailing-spaces-004-ref.html">
|
||||
<meta name="assert" content="Preserved white space at the end of the line is hanged when white-space is pre-wrap.">
|
||||
<meta name="assert" content="Preserved white space at the end of a soft-wrapped line is hanged when white-space is pre-wrap.">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue