Skip to content

Commit 88173cf

Browse files
author
Adam Argyle
committed
new hesitation effects
1 parent 555a735 commit 88173cf

11 files changed

Lines changed: 75 additions & 7 deletions

src/circles/_includes.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
@import "in-hesitate.css";
2+
@import "out-hesitate.css";
3+
14
@import "in-center.css";
25
@import "out-center.css";
36

src/circles/_vars.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
:root {
22
--circle-center-center-out: circle(0%);
33
--circle-center-center-in: circle(125%);
4+
--circle-hesitate: circle(40%);
45

56
--circle-top-left-out: circle(0% at top left);
67
--circle-top-right-out: circle(0% at top right);

src/circles/in-hesitate.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@keyframes circle-in-hesitate {
2+
0% {
3+
clip-path: var(--circle-center-center-out);
4+
}
5+
40% {
6+
clip-path: var(--circle-hesitate);
7+
}
8+
100% {
9+
clip-path: var(--circle-center-center-in);
10+
}
11+
}
12+
13+
[transition="in:circle:hesitate"] {
14+
animation-name: circle-in-hesitate;
15+
}

src/circles/out-hesitate.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@keyframes circle-out-hesitate {
2+
0% {
3+
clip-path: var(--circle-center-center-in);
4+
}
5+
40% {
6+
clip-path: var(--circle-hesitate);
7+
}
8+
100% {
9+
clip-path: var(--circle-center-center-out);
10+
}
11+
}
12+
13+
[transition="out:circle:hesitate"] {
14+
animation-name: circle-out-hesitate;
15+
}

src/polygons/_vars.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
:root {
22
--diamond-center-in: polygon(-50% 50%, 50% -50%, 150% 50%, 50% 150%);
33
--diamond-center-out: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%);
4-
--diamond-height-stretched: polygon(45% 50%, 50% 25%, 55% 50%, 50% 75%);
4+
--diamond-hesitate: polygon(45% 50%, 50% 25%, 55% 50%, 50% 75%);
55

66
--opposing-corners-in: polygon(0 0, 0 100%, 100% 100%, 100% 0);
77
--opposing-corners-out: polygon(0 0, 50% 50%, 100% 100%, 50% 50%);

src/polygons/diamond-in-height-width.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
clip-path: var(--diamond-center-out);
44
}
55
40% {
6-
clip-path: var(--diamond-height-stretched);
6+
clip-path: var(--diamond-hesitate);
77
}
88
100% {
99
clip-path: var(--diamond-center-in);
1010
}
1111
}
1212

13-
[transition="in:diamond:height-width"] {
13+
[transition="in:diamond:hesitate"] {
1414
--transition__duration: 1.5s;
1515
animation-name: diamond-in-double-scale;
1616
}

src/polygons/diamond-out-height-width.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
clip-path: var(--diamond-center-in);
44
}
55
40% {
6-
clip-path: var(--diamond-height-stretched);
6+
clip-path: var(--diamond-hesitate);
77
}
88
100% {
99
clip-path: var(--diamond-center-out);
1010
}
1111
}
1212

13-
[transition="out:diamond:height-width"] {
13+
[transition="out:diamond:hesitate"] {
1414
--transition__duration: 1.5s;
1515
animation-name: diamond-out-double-scale;
1616
}

src/squares/_includes.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
@import "in-hesitate.css";
2+
@import "out-hesitate.css";
3+
14
@import "in-center.css";
2-
@import "out-center.css"
3-
;
5+
@import "out-center.css";
6+
47
@import "out-top-left.css";
58
@import "out-top-right.css";
69
@import "out-bottom-left.css";

src/squares/_vars.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
:root {
2+
--square-hesitate: inset(33% 33% 33% 33%);
23
--square-out: inset(100% 100% 100% 100%);
34
--square-in: var(--wipe-in);
45
--square-top-left-out: inset(0 100% 100% 0);

src/squares/in-hesitate.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@keyframes square-in-hesitate {
2+
0% {
3+
clip-path: var(--square-out);
4+
}
5+
40% {
6+
clip-path: var(--square-hesitate);
7+
}
8+
100% {
9+
clip-path: var(--square-in);
10+
}
11+
}
12+
13+
[transition="in:square:hesitate"] {
14+
animation-name: square-in-hesitate;
15+
}

0 commit comments

Comments
 (0)