Skip to content

Commit

Permalink
fix(whatislove-dev/careers-whatislove-dev): imporve animation perform…
Browse files Browse the repository at this point in the history
…ance wd-591 (#633)
  • Loading branch information
what1s1ove authored Jun 15, 2024
1 parent 24fe1e5 commit 7018131
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
cursor: pointer;
background-color: transparent;
border: 0;
will-change: transform;
animation: glitch var(--timing-function-glitch) 6ms infinite;

&:focus-visible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,6 @@
color: var(--color-dark);
-webkit-text-stroke: 2px var(--color-light);
text-align: center;
will-change: transform;
animation: glitch var(--timing-function-glitch) 6ms infinite;
}
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ class EasterEgg {
)
let { x, y } = getNodeRandomCoords(easterEggButtonWrapperNode)

easterEggButtonWrapperNode.style.top = `${y}px`
easterEggButtonWrapperNode.style.left = `${x}px`
easterEggButtonWrapperNode.style.insetBlockStart = `${y}px`
easterEggButtonWrapperNode.style.insetInlineStart = `${x}px`
}

/**
Expand Down
1 change: 1 addition & 0 deletions apps/whatislove-dev/src/styles/blocks/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
.header__menu-item {
&[class*="--careers"] {
@media (prefers-reduced-motion: no-preference) {
will-change: transform;
animation: glitch cubic-bezier(0.5, -0.25, 0.75, 1) 6ms infinite;
}
}
Expand Down
2 changes: 2 additions & 0 deletions apps/whatislove-dev/src/styles/blocks/not-easter-egg.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
margin: 0;
overflow: hidden;
border-radius: 50%;
will-change: inset-block-start, inset-inline-start;

&::before {
position: absolute;
Expand All @@ -28,6 +29,7 @@
background-color: hsl(var(--color-yellow-100) / 20%);
transform: skewX(-25deg);
translate: 0 -50%;
will-change: inset-inline-start;
animation: shine 5s infinite;
}

Expand Down

0 comments on commit 7018131

Please sign in to comment.