Skip to content

Commit 4424f59

Browse files
jdmservo-wpt-sync
authored andcommitted
layout: Reverse vertical orientation of gradients using corner directions.
Signed-off-by: Josh Matthews <[email protected]>
1 parent 94988e3 commit 4424f59

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!doctype html>
2+
<meta charset="utf-8">
3+
<title>Linear gradients for non-square elements</title>
4+
<link rel="help" href="https://drafts.csswg.org/css-images/#linear-gradients">
5+
<link rel="match" href="reference/linear-gradient-non-square-ref.html">
6+
<style>
7+
.a,
8+
.b,
9+
.c,
10+
.d {
11+
width: 200px;
12+
height: 100px;
13+
}
14+
.a {
15+
background: linear-gradient(to right bottom, black 50%, lightgray 50%);
16+
}
17+
.b {
18+
background: linear-gradient(to left bottom, black 50%, lightgray 50%);
19+
}
20+
.c {
21+
background: linear-gradient(to left top, black 50%, lightgray 50%);
22+
}
23+
.d {
24+
background: linear-gradient(to right top, black 50%, lightgray 50%);
25+
}
26+
</style>
27+
<div class="a"></div>
28+
<div class="b"></div>
29+
<div class="c"></div>
30+
<div class="d"></div>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!doctype html>
2+
<meta charset="utf-8">
3+
<title>Linear gradients for non-square elements reference</title>
4+
<style>
5+
.a,
6+
.b,
7+
.c,
8+
.d {
9+
width: 200px;
10+
height: 100px;
11+
}
12+
.a {
13+
background: linear-gradient(-206.56505118deg, black 50%, lightgray 50%);
14+
}
15+
.b {
16+
background: linear-gradient(206.56505118deg, black 50%, lightgray 50%);
17+
}
18+
.c {
19+
background: linear-gradient(-26.56505118deg, black 50%, lightgray 50%);
20+
}
21+
.d {
22+
background: linear-gradient(26.56505118deg, black 50%, lightgray 50%);
23+
}
24+
</style>
25+
<div class="a"></div>
26+
<div class="b"></div>
27+
<div class="c"></div>
28+
<div class="d"></div>

0 commit comments

Comments
 (0)