@@ -153,85 +153,22 @@ html, body, #app {
153153 padding : 0 ;
154154}
155155
156- /* Route containers */
157- .new-route-container ,
158- .current-route-container ,
159- .route-content {
160- width : 100% ;
161- min-height : 100vh ;
162- background-color : var (--background-color );
163- color : var (--text-primary );
164- }
165-
166- /* Absolute positioning for transition containers */
167- .new-route-container ,
168- .current-route-container {
169- position : absolute;
170- top : 0 ;
171- left : 0 ;
172- right : 0 ;
173- bottom : 0 ;
174- overflow : hidden;
175- }
176-
177- .new-route-container {
178- z-index : 5 ;
179- /* Initially hidden, will be shown via JS */
180- display : none;
181- }
182-
183- .current-route-container {
184- z-index : 1 ;
185- display : block;
186- }
187-
188- /* The final route content container */
189- .route-content {
190- display : block;
191- position : relative;
192- }
193-
194- /* Ensure proper styling during transitions */
195- .new-route-container * ,
196- .current-route-container * ,
197- .route-content * {
198- color : var (--text-primary );
199- transition : color var (--transition-normal );
200- }
201-
202- /* Prevent any content from showing through during transitions */
203- .new-route-container ::before ,
204- .current-route-container ::before {
205- content : "" ;
206- position : absolute;
156+ /* Transition overlay */
157+ .transition-overlay {
158+ position : fixed;
207159 top : 0 ;
208160 left : 0 ;
209161 right : 0 ;
210162 bottom : 0 ;
163+ width : 100vw ;
164+ height : 100vh ;
211165 background-color : var (--background-color );
212- z-index : -1 ;
213- }
214-
215- .loading {
216- display : flex;
217- align-items : center;
218- justify-content : center;
219- font-size : var (--font-size-lg );
220- color : var (--text-primary );
221- padding : var (--spacing-xl );
222- }
223-
224- /* Ensure all text elements maintain proper coloring during transitions */
225- body , h1 , h2 , h3 , h4 , h5 , h6 , p , span , a , button , input , textarea , select , label , li {
226- color : var (--text-primary );
227- transition : color var (--transition-normal );
228- }
229-
230- /* Prevent FOUC (Flash of Unstyled Content) during transitions */
231- .new-route-container * ,
232- .current-route-container * {
233- color : var (--text-primary ) !important ;
234- background-color : var (--background-color );
166+ z-index : 9999 ;
167+ display : block;
168+ overflow : hidden;
169+ opacity : 0 ;
170+ transition : opacity 150ms ease-in-out;
171+ pointer-events : none; /* Allow clicks to pass through when faded out */
235172}
236173
237174/* Theme toggle styles */
@@ -412,29 +349,4 @@ body, h1, h2, h3, h4, h5, h6, p, span, a, button, input, textarea, select, label
412349.bg-primary { background-color : var (--primary-color ); }
413350.bg-secondary { background-color : var (--secondary-color ); }
414351.bg-surface { background-color : var (--surface-color ); }
415- .bg-surface-variant { background-color : var (--surface-variant ); }
416-
417- /* JavaScript for theme toggle */
418- /*
419- document.addEventListener('DOMContentLoaded', () => {
420- const themeToggle = document.querySelector('.theme-toggle');
421- const prefersDarkScheme = window.matchMedia('(prefers-color-scheme: dark)');
422-
423- // Check for saved theme preference or use the system preference
424- const savedTheme = localStorage.getItem('theme');
425- if (savedTheme === 'dark' || (!savedTheme && prefersDarkScheme.matches)) {
426- document.documentElement.setAttribute('data-theme', 'dark');
427- } else {
428- document.documentElement.setAttribute('data-theme', 'light');
429- }
430-
431- // Toggle theme when the button is clicked
432- themeToggle.addEventListener('click', () => {
433- const currentTheme = document.documentElement.getAttribute('data-theme') || 'light';
434- const newTheme = currentTheme === 'light' ? 'dark' : 'light';
435-
436- document.documentElement.setAttribute('data-theme', newTheme);
437- localStorage.setItem('theme', newTheme);
438- });
439- });
440- */
352+ .bg-surface-variant { background-color : var (--surface-variant ); }
0 commit comments