mirror of
https://github.com/servo/servo
synced 2026-04-28 18:37:39 +02:00
53 lines
1.6 KiB
HTML
53 lines
1.6 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml"><head>
|
|
<title>CSS Test: SVG element in HTML should respect margin, padding, and border properties</title>
|
|
<link href="http://www.google.com/" rel="author" title="Google" />
|
|
<link href="reference/inline-svg-margin-padding-border-ref.xht" rel="match" />
|
|
<link href="http://www.w3.org/TR/CSS21/box.html#margin-properties" rel="help" />
|
|
<link href="http://www.w3.org/TR/CSS21/box.html#padding-properties" rel="help" />
|
|
<link href="http://www.w3.org/TR/CSS21/box.html#border-properties" rel="help" />
|
|
<link href="http://www.w3.org/TR/SVG/shapes.html#RectElement" rel="help" />
|
|
<link href="http://www.w3.org/TR/SVG/painting.html#FillProperty" rel="help" />
|
|
<meta content="svg" name="flags" />
|
|
<meta content="Inline SVG elements should respect CSS margin, padding, and border properties" name="assert" />
|
|
<style type="text/css">
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
#container {
|
|
margin: 10px;
|
|
padding: 10px;
|
|
border: 10px solid red;
|
|
position: absolute;
|
|
left: 0px;
|
|
top: 0px;
|
|
z-index: -1;
|
|
}
|
|
|
|
#container div {
|
|
width: 60px;
|
|
height: 60px;
|
|
background: red;
|
|
}
|
|
|
|
svg {
|
|
width: 60px;
|
|
height: 60px;
|
|
margin: 10px;
|
|
padding: 10px;
|
|
border: 10px solid green;
|
|
}
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="container"><div></div></div>
|
|
<svg version="1.1" viewBox="0 0 100 100" xmlns:xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg">
|
|
<rect y="0" width="100" fill="green" x="0" height="100"></rect>
|
|
</svg>
|
|
|
|
|
|
</body></html> |