mirror of
https://github.com/servo/servo.git
synced 2025-07-12 09:53:40 +01:00
Use background-size, background-position properties to render CSS gradients. Some cleanup in display_list_builder.rs related to gradient calculations. Adds two wpt tests for tiled gradients. Note: For now even gradients with background-repeat: no-repeat are repeated. Sometimes the gradient is not repeated everywhere. Enable vars-background-shorthand-001.html CSS test.
40 lines
850 B
HTML
40 lines
850 B
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<style>
|
|
body {
|
|
margin: 0px;
|
|
}
|
|
|
|
#outer {
|
|
position: absolute;
|
|
width: 600px;
|
|
height: 200px;
|
|
background-color: aquamarine;
|
|
}
|
|
|
|
#left, #right {
|
|
position: absolute;
|
|
width: 300px;
|
|
height: 200px;
|
|
background-image: radial-gradient(closest-side, red 40%, transparent 40%)
|
|
|
|
}
|
|
#left {
|
|
left: 80px;
|
|
}
|
|
|
|
#right {
|
|
left: 380px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="outer">
|
|
<div id="left"></div>
|
|
<div id="right"></div>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|