@@ -74,9 +74,7 @@ const THEME_OPTIONS = [
7474 </script >
7575
7676<style scoped lang="scss">
77- // Performance variables - computed once, reused everywhere
78- $transition-standard : 0.3s ease ;
79- $transition-bounce : 0.3s cubic-bezier (0.68 , -0.55 , 0.27 , 1.55 );
77+ $trans : 0.3s ease ;
8078$border-accent : 1px solid hsla (var (--accent-hsl ) / 0.2 );
8179$blur-backdrop : blur (1rem );
8280
@@ -99,7 +97,7 @@ $blur-backdrop: blur(1rem);
9997 background-image : var (--c-bg-gradient );
10098 backdrop-filter : $blur-backdrop ;
10199 cursor : pointer ;
102- transition : transform $transition-standard , background $transition-standard , color $transition-standard ;
100+ transition : transform $trans , background $trans , color $trans ;
103101 width : var (--roller-size );
104102 height : var (--roller-size );
105103
@@ -128,7 +126,7 @@ $blur-backdrop: blur(1rem);
128126 opacity : 0 ;
129127 pointer-events : none ;
130128 clip-path : polygon (0 0 , 100% 0 , 100% 0 , 0% 0 );
131- transition : opacity $transition-standard , clip-path $transition-standard ;
129+ transition : opacity $trans , clip-path $trans ;
132130
133131 button {
134132 position : relative ;
@@ -141,7 +139,7 @@ $blur-backdrop: blur(1rem);
141139 border-radius : 50vw ;
142140 cursor : pointer ;
143141 transform : scale (0 );
144- transition : transform $transition-bounce , color $transition-standard ;
142+ transition : transform 0.3 s $easeInOutBack , color $trans ;
145143
146144 // Tooltip optimization
147145 & ::after {
@@ -159,7 +157,7 @@ $blur-backdrop: blur(1rem);
159157 border-radius : 50vw ;
160158 opacity : 0 ;
161159 transform : translate (-50% , 0% ) scale (0 );
162- transition : opacity $transition-standard , transform $transition-standard ;
160+ transition : opacity $trans , transform $trans ;
163161 z-index : 2 ;
164162 pointer-events : none ;
165163 }
@@ -192,18 +190,4 @@ $blur-backdrop: blur(1rem);
192190 }
193191 }
194192}
195-
196- // Transition component optimization
197- .slideX {
198- & -enter-active ,
199- & -leave-active {
200- transition : transform $transition-standard , opacity $transition-standard ;
201- }
202-
203- & -enter-from ,
204- & -leave-to {
205- transform : translateX (100% );
206- opacity : 0 ;
207- }
208- }
209193 </style >
0 commit comments