Skip to content

Commit 9c85f19

Browse files
author
Adam Argyle
committed
added angle wipes
1 parent fa8a375 commit 9c85f19

11 files changed

Lines changed: 125 additions & 1 deletion

app/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,20 @@ <h3>Wipes</h3>
116116
<dd><a href="#">in:wipe:left</a></dd>
117117
<dd><a href="#">in:wipe:up</a></dd>
118118
<dd><a href="#">in:wipe:down</a></dd>
119+
<dd><a href="#">in:wipe:top-right</a></dd>
120+
<dd><a href="#">in:wipe:top-left</a></dd>
121+
<dd><a href="#">in:wipe:bottom-right</a></dd>
122+
<dd><a href="#">in:wipe:bottom-left</a></dd>
119123

120124
<dt>Exits</dt>
121125
<dd><a href="#">out:wipe:right</a></dd>
122126
<dd><a href="#">out:wipe:left</a></dd>
123127
<dd><a href="#">out:wipe:up</a></dd>
124128
<dd><a href="#">out:wipe:down</a></dd>
129+
<dd><a href="#">out:wipe:top-right</a></dd>
130+
<dd><a href="#">out:wipe:top-left</a></dd>
131+
<dd><a href="#">out:wipe:bottom-right</a></dd>
132+
<dd><a href="#">out:wipe:bottom-left</a></dd>
125133
</dl>
126134

127135
<h3>Polygons</h3>

src/wipes/_includes.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,14 @@
66
@import "in-top.css";
77
@import "in-right.css";
88
@import "in-bottom.css";
9-
@import "in-left.css";
9+
@import "in-left.css";
10+
11+
@import "in-top-right.css";
12+
@import "in-top-left.css";
13+
@import "in-bottom-right.css";
14+
@import "in-bottom-left.css";
15+
16+
@import "out-top-right.css";
17+
@import "out-top-left.css";
18+
@import "out-bottom-right.css";
19+
@import "out-bottom-left.css";

src/wipes/_vars.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,14 @@
44
--wipe-left: inset(0 100% 0 0);
55
--wipe-top: inset(0 0 100% 0);
66
--wipe-right: inset(0 0 0 100%);
7+
8+
--wipe-top-left-in: polygon(50% -50%, 150% 50%, 50% 150%, -50% 50%);
9+
--wipe-top-right-in: polygon(50% -50%, 150% 50%, 50% 150%, -50% 50%);
10+
--wipe-bottom-left-in: polygon(50% -50%, 150% 50%, 50% 150%, -50% 50%);
11+
--wipe-bottom-right-in: polygon(-50% 0%, 200% 0, 0 200%, 0 -50%);
12+
13+
--wipe-top-left-out: polygon(0 0, 0 0, 0 0, 0 50%);
14+
--wipe-top-right-out: polygon(50% -50%, 150% 50%, 150% 50%, 50% -50%);
15+
--wipe-bottom-left-out: polygon(-50% 50%, 50% 150%, 50% 150%, -50% 50%);
16+
--wipe-bottom-right-out: polygon(150% 50%, 150% 50%, 50% 150%, 50% 150%);
717
}

src/wipes/in-bottom-left.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@keyframes wipe-in-bottom-left {
2+
from {
3+
clip-path: var(--wipe-top-right-out);
4+
}
5+
to {
6+
clip-path: var(--wipe-bottom-left-in);
7+
}
8+
}
9+
10+
[transition="in:wipe:bottom-left"] {
11+
animation-name: wipe-in-bottom-left;
12+
}

src/wipes/in-bottom-right.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@keyframes wipe-in-bottom-right {
2+
from {
3+
clip-path: var(--wipe-top-left-out);
4+
}
5+
to {
6+
clip-path: var(--wipe-bottom-right-in);
7+
}
8+
}
9+
10+
[transition="in:wipe:bottom-right"] {
11+
animation-name: wipe-in-bottom-right;
12+
}

src/wipes/in-top-left.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@keyframes wipe-in-top-left {
2+
from {
3+
clip-path: var(--wipe-bottom-right-out);
4+
}
5+
to {
6+
clip-path: var(--wipe-top-left-in);
7+
}
8+
}
9+
10+
[transition="in:wipe:top-left"] {
11+
animation-name: wipe-in-top-left;
12+
}

src/wipes/in-top-right.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@keyframes wipe-in-top-right {
2+
from {
3+
clip-path: var(--wipe-bottom-left-out);
4+
}
5+
to {
6+
clip-path: var(--wipe-top-right-in);
7+
}
8+
}
9+
10+
[transition="in:wipe:top-right"] {
11+
animation-name: wipe-in-top-right;
12+
}

src/wipes/out-bottom-left.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@keyframes wipe-out-bottom-left {
2+
from {
3+
clip-path: var(--wipe-top-right-in);
4+
}
5+
to {
6+
clip-path: var(--wipe-bottom-left-out);
7+
}
8+
}
9+
10+
[transition="out:wipe:bottom-left"] {
11+
animation-name: wipe-out-bottom-left;
12+
}

src/wipes/out-bottom-right.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@keyframes wipe-out-bottom-right {
2+
from {
3+
clip-path: var(--wipe-top-left-in);
4+
}
5+
to {
6+
clip-path: var(--wipe-bottom-right-out);
7+
}
8+
}
9+
10+
[transition="out:wipe:bottom-right"] {
11+
animation-name: wipe-out-bottom-right;
12+
}

src/wipes/out-top-left.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@keyframes wipe-out-top-left {
2+
from {
3+
clip-path: var(--wipe-bottom-right-in);
4+
}
5+
to {
6+
clip-path: var(--wipe-top-left-out);
7+
}
8+
}
9+
10+
[transition="out:wipe:top-left"] {
11+
animation-name: wipe-out-top-left;
12+
}

0 commit comments

Comments
 (0)