Skip to content

Commit 1029421

Browse files
committed
update animation duration enhance animation
1 parent 5fae988 commit 1029421

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

static/css/devportal2024-v1.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

styles/_top-banner.scss

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
text-decoration: none;
1313
color: $white;
1414
.button-icon{
15-
animation: iconJitter 1.65s ease-in-out forwards;
15+
animation: iconJitter 1s ease-in-out forwards;
1616
}
1717
}
1818
color: $white !important;
@@ -28,18 +28,20 @@
2828
position: absolute;
2929
top: 0;
3030
left: 0;
31-
width: 0%;
31+
width: 100%; // Full width so that we can scale it
3232
height: 100%;
3333
background-color: #7919FF;
3434
z-index: 0;
35-
transition: width 2s ease-out;
35+
transform: scaleX(0); // Start scaled down to 0
36+
transform-origin: left; // Scale from the left edge
37+
transition: transform 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
38+
will-change: transform; // Hint for smoother animations
3639
}
3740

38-
// On hover, expand the pseudo-element to cover the full width
41+
// On hover, scale to full width
3942
&:hover::after {
40-
width: 100%;
43+
transform: scaleX(1);
4144
}
42-
4345
// Ensure direct children are above the pseudo-element
4446
> * {
4547
position: relative;

0 commit comments

Comments
 (0)