blob: 5604e121de84249897212f2c6ca1a51973fdd9ae [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;
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;
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>