Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-horizontal-rtl.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<title>CSS Test: Test shape-outside with linear gradient when rtl direction is applied.</title>
<link rel="match" href="reference/shape-outside-linear-gradient-horizontal-rtl-ref.html">
<meta name="assert" content="This test verifies that shape-outside respects a simple linear gradient when rtl direction is applied.">
<link rel="stylesheet" href="/fonts/ahem.css">
<style>
.container {
inline-size: 100px;
block-size: 200px;
background-color: red;
font-family: Ahem;
font-size: 50px;
line-height: 1;
direction: rtl;
color: green;
}
#float-left {
float: left;
inline-size: 100px;
block-size: 200px;
background: linear-gradient(to right, green 50%, transparent 50%);
shape-outside: linear-gradient(to right, green 50%, transparent 50%);
}
#float-right {
float: right;
inline-size: 100px;
block-size: 200px;
background: linear-gradient(to left, green 50%, transparent 50%);
shape-outside: linear-gradient(to left, green 50%, transparent 50%);
}
</style>
</head>
<body>
<p>
The test passes if you see a green square. There should be no red.
</p>
<div class="container">
<div id="float-left"></div>
x x x x
</div>
<div class="container">
<div id="float-right"></div>
x x x x
</div>
</body>
</html>