summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-text/line-break/line-break-anywhere-003.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-text/line-break/line-break-anywhere-003.html')
-rw-r--r--testing/web-platform/tests/css/css-text/line-break/line-break-anywhere-003.html25
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-text/line-break/line-break-anywhere-003.html b/testing/web-platform/tests/css/css-text/line-break/line-break-anywhere-003.html
new file mode 100644
index 0000000000..0b004b04a0
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/line-break/line-break-anywhere-003.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html lang=en>
+<meta charset="utf-8">
+<title>CSS Text Test: line-break: anywhere</title>
+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
+<link rel="help" title="5.3. Line Breaking Strictness: the line-break property" href="https://www.w3.org/TR/css-text-3/#propdef-line-break">
+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-line-break-anywhere">
+<link rel="match" href="reference/line-break-anywhere-003-ref.html">
+<meta name="assert" content="line-break: anywhere means lines may break between any two typographic letter units.">
+<style type='text/css'>
+.test { line-break: anywhere; }
+/* the CSS below is not part of the test */
+.test, .ref { border: 1px solid orange; margin: 20px; padding: 10px; width: 390px; font: 36px/1 sans-serif; }
+</style>
+</head>
+<body>
+<div id='instructions'>Test passes if the two orange boxes are the same.</div>
+<div class="test"><div id="testdiv"><span id="testspan">Latin latin latin latin</span></div></div>
+<div class="ref"><span>Latin latin latin lati<br/>n</span></div>
+<script>
+var sentenceWidth = document.getElementById('testspan').offsetWidth
+document.getElementById('testdiv').style.width = String(sentenceWidth - 5)+'px'
+</script>
+</body>
+</html>