Skip to content

Commit 1532058

Browse files
committed
1 parent b47a7e3 commit 1532058

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<meta charset="utf-8">
3+
<title>SVG Test Reference</title>
4+
<style>
5+
foreignObject { font: 20px/1.2 monospace; text-overflow: ellipsis; }
6+
</style>
7+
<p>Test passes if the text below is truncated with an ellipsis, and matches the reference.</p>
8+
<svg width="300" height="30" xmlns="http://www.w3.org/2000/svg">
9+
<foreignObject width="100" height="24">overflowingwordoverflowingword</foreignObject>
10+
</svg>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<meta charset="utf-8">
3+
<title>SVG Test: text-overflow presentation attribute ellipsizes an overflowing foreignObject line</title>
4+
<link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/styling.html#PresentationAttributes">
5+
<link rel="help" href="https://drafts.csswg.org/css-overflow-3/#text-overflow">
6+
<link rel="match" href="text-overflow-presentation-attribute-foreignobject-ref.html">
7+
<style>
8+
/* foreignObject gets overflow: hidden from the SVG user agent style sheet, which is
9+
the precondition text-overflow needs. The single long word supplies the overflowing
10+
line without requiring white-space: nowrap. */
11+
foreignObject { font: 20px/1.2 monospace; }
12+
</style>
13+
<p>Test passes if the text below is truncated with an ellipsis, and matches the reference.</p>
14+
<svg width="300" height="30" xmlns="http://www.w3.org/2000/svg">
15+
<foreignObject width="100" height="24" text-overflow="ellipsis">overflowingwordoverflowingword</foreignObject>
16+
</svg>

0 commit comments

Comments
 (0)