mirror of
https://github.com/servo/servo.git
synced 2025-07-02 21:13:39 +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.
22 lines
719 B
HTML
22 lines
719 B
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Eight Red Triangles on White Ground (with gradients)</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-size">
|
|
<meta name="assert" content="Gradients are correctly repeated.">
|
|
<link rel="match" href="tiled-gradients-ref.html">
|
|
<style>
|
|
#gradient {
|
|
width: 400px;
|
|
height: 200px;
|
|
background-size: 25% 50%;
|
|
background-image: linear-gradient(to bottom left, red 50%, transparent 50%);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="gradient"></div>
|
|
</body>
|
|
</html>
|
|
|