|
| 1 | +<!DOCTYPE html> |
| 2 | +<meta charset="utf-8"> |
| 3 | +<title>CSS Text level 3 Test: preserved trailing white space that hang in a textarea</title> |
| 4 | +<link rel=" author" title=" Javier Fernandez" href=" mailto:[email protected]" /> |
| 5 | +<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> |
| 6 | +<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property"> |
| 7 | +<link rel="help" title="4.1.2. Phase II: Trimming and Positioning" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> |
| 8 | +<link rel="help" title="6.1. Text Alignment: the text-align shorthand" href="https://drafts.csswg.org/css-text-3/#text-align-property"> |
| 9 | +<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> |
| 10 | +<link rel="match" href="reference/trailing-space-and-text-alignment-002-ref.html"> |
| 11 | +<meta name="assert" content="preserved trailing spaces under 'white-space: break-spaces' shouldn't hang and may cause overflow and activate the horizontal scrollbar."> |
| 12 | +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> |
| 13 | +<style> |
| 14 | + textarea { |
| 15 | + /* Reset user-agent style */ |
| 16 | + margin: initial; |
| 17 | + padding: initial; |
| 18 | + border: initial; |
| 19 | + outline: initial; |
| 20 | + resize: initial; |
| 21 | + overflow-wrap: initial; |
| 22 | + |
| 23 | + height: 100px; |
| 24 | + font: 40px/1 Ahem; |
| 25 | + border: 1px solid black; |
| 26 | + overflow-y: hidden; |
| 27 | + overflow-x: auto; |
| 28 | + |
| 29 | + /* testing */ |
| 30 | + width: 3ch; |
| 31 | + white-space: break-spaces; |
| 32 | +} |
| 33 | +.left { text-align: left; } |
| 34 | +.center { text-align: center; } |
| 35 | +.right { text-align: right; } |
| 36 | +.start { text-align: start; } |
| 37 | +.end { text-align: end; } |
| 38 | +</style> |
| 39 | +<textarea class="left">XXX X</textarea> |
| 40 | +<textarea class="center">XXX X</textarea> |
| 41 | +<textarea class="right">XXX X</textarea> |
| 42 | +<textarea class="start">XXX X</textarea> |
| 43 | +<textarea class="end">XXX X</textarea> |
0 commit comments