Skip to content

Commit 03f2ec8

Browse files
committed
add gentle anim
1 parent 6a8b325 commit 03f2ec8

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

lib/nthul/src/styles.css

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,28 @@
2626
content: "A";
2727
}
2828

29+
.light.nthul--color-switch {
30+
box-shadow: 0 0 50px 10px yellow;
31+
background-color: yellow;
32+
border: 1px solid orangered;
33+
}
34+
2935
.dark.nthul--color-switch {
3036
box-shadow: calc(var(--size) / 4) calc(var(--size) / -4) calc(var(--size) / 8) inset #fff;
3137
border: none;
3238
background: transparent;
39+
animation: swing linear 0.5s;
3340
}
3441

35-
.light.nthul--color-switch {
36-
box-shadow: 0 0 50px 10px yellow;
37-
background-color: yellow;
38-
border: 1px solid orangered;
42+
@keyframes swing {
43+
40% {
44+
transform: rotate(-15deg);
45+
}
46+
80% {
47+
transform: rotate(10deg);
48+
}
49+
0%,
50+
100% {
51+
transform: rotate(0deg);
52+
}
3953
}

0 commit comments

Comments
 (0)