blob: fb2361c7b45ea2f2a0a33bea4d3eee79dc63242a [file] [log] [blame]
<html>
<head>
<style>
/*
The aspect-ratio preserving object-fit:cover property causes the 10x100 image to be scaled to 100x1000 and then centered.
The shape-outside is clipped to the image-shape's margin-box, which means that most of the scaled image will be clipped away.
*/
#image-shape {
float: left;
-webkit-shape-outside: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10px' height='100px'><rect width='10' height='100' fill='blue'/></svg>");
width: 100px;
height: 200px;
object-fit: cover;
margin-right: 50px; /* expose shape-outside property failures */
margin-top: 50px; /* expose 100x50 strips of the shape above and below the SVG image */
margin-bottom: 50px;
}
#content {
font: 50px/1 Ahem, sans-serif;
-webkit-font-smoothing: antialiased;
color: green;
}
</style>
<div id="content">
<img id="image-shape"
src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10px' height='100px'><rect width='10' height='100' fill='blue'/></svg>">
</img>
X<br>X<br>X<br>X<br>X<br>X<br>X
</div>
</body>
</html>