servo/tests/ref/clip_a.html
Patrick Walton 6b28965b94 layout: Implement clip per CSS 2.1 § 11.1.2.
Only the recommended, comma-separated syntax is supported.
2014-12-18 13:07:13 -08:00

52 lines
807 B
HTML

<!DOCTYPE html>
<html>
<head>
<!-- Tests that various `clip` values per CSS 2.1 work. -->
<style>
section {
position: absolute;
padding: 32px;
width: 64px;
height: 64px;
background: green;
border: solid 32px red;
}
section:before {
content: "";
display: block;
padding: 0;
width: 64px;
height: 64px;
background: blue;
}
#a {
top: 0;
left: 0;
clip: rect(auto, auto, auto, auto);
}
#b {
top: 192px;
left: 0;
clip: rect(32px, auto, auto, 128px);
}
#c {
top: 0;
left: 192px;
clip: rect(32px, 128px, 64px, 0);
}
#d {
top: 192px;
left: 192px;
clip: rect(64px, 0, 64px, 0);
}
</style>
</head>
<body>
<section id=a></section>
<section id=b></section>
<section id=c></section>
<section id=d></section>
</body>
</html>