Skip to content

Commit

Permalink
Merge pull request #621 from vltansky/feat/rotate-with-css
Browse files Browse the repository at this point in the history
Logo rotate animation with css
  • Loading branch information
cocopon authored Nov 3, 2024
2 parents 5c88c1e + 79b4f15 commit aa34f26
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 11 additions & 1 deletion packages/tweakpane/src/doc/sass/components/_logo.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
@keyframes rotateAnimation {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

.logo {
$logo-color: var(--fg-color);
$logo-hover-color: var(--fg-color-action);
Expand Down Expand Up @@ -29,7 +38,8 @@
border-radius: 4px;
display: block;
height: 12px;
transition: transform 0.05s ease-out;
animation: rotateAnimation auto linear;
animation-timeline: scroll(root);
width: 12px;
}
&:hover &_symbol {
Expand Down
4 changes: 3 additions & 1 deletion packages/tweakpane/src/doc/ts/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ function setUpVersionSwitcher() {
}, initIndex);
router.route(location.pathname);

setUpScrews();
setUpSpMenu();
if (!CSS.supports('animation-timeline', 'scroll()')) {
setUpScrews();
}
setUpVersionSwitcher();

hljs.highlightAll();
Expand Down

0 comments on commit aa34f26

Please sign in to comment.