Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-text-decor/text-decoration-thickness-linethrough-descendant-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>text-decoration: line-through thickness applies over a descendant inline box</title>
<link rel="match" href="text-decoration-thickness-linethrough-descendant-001-ref.html">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<meta name="assert" content="A line-through set on an ancestor is painted at the ancestor's text-decoration-thickness over a descendant inline box's text, not the descendant's own (auto) thickness.">
<style>
div {
overflow: hidden;
height: 1em;
width: 4em;
background-color: red;
font: 20px/1 Ahem;
color: transparent;
text-decoration: green line-through;
text-decoration-skip-ink: none;
/* Much thicker than the 1em line box (excess clipped by overflow) so the green line-through
fully covers the content-box no matter where the line-through is centered. */
text-decoration-thickness: 2em;
}
</style>
</head>
<body>
<p>Test passes if there is a wide green block, fails if there is any red visible</p>
<div>X<span>XX</span>X</div>
</body>
</html>