mirror of
https://github.com/servo/servo.git
synced 2025-08-27 08:08:19 +01:00
layout: Implement CSS linear gradients per the CSS-IMAGES specification.
This implements the CSS `linear-gradient` property per the CSS-IMAGES specification: http://dev.w3.org/csswg/css-images-3/ Improves GitHub.
This commit is contained in:
parent
44fa9f9b18
commit
215c2a9d4c
17 changed files with 865 additions and 42 deletions
33
tests/ref/linear_gradients_reverse_ref.html
Normal file
33
tests/ref/linear_gradients_reverse_ref.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- Tests that reversed linear gradients are equivalent. -->
|
||||
<style>
|
||||
nav {
|
||||
display: block;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border: solid black 1px;
|
||||
}
|
||||
#a {
|
||||
background: linear-gradient(0deg, green, #008000 50%, red 50%, red);
|
||||
}
|
||||
#b {
|
||||
background: linear-gradient(to left, #ffffff, black);
|
||||
}
|
||||
#c {
|
||||
background: linear-gradient(225deg, purple, purple 50%, yellow 50%, yellow);
|
||||
}
|
||||
#d {
|
||||
background: linear-gradient(315deg, pink, pink 50%, lime 50%, lime);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<nav id=a></nav>
|
||||
<nav id=b></nav>
|
||||
<nav id=c></nav>
|
||||
<nav id=d></nav>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue