#How to solve the problem of element overlap in ClientRouter
3 messages · Page 1 of 1 (latest)
Hi @marsh walrus. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
I apologize, but the knowledge sources provided do not contain specific information about solving element overlap issues with ClientRouter or the transition:name attribute in Astro. The documents mainly cover general aspects of View Transitions in Astro, but do not address this particular problem.
However, based on your description, it seems you're experiencing a z-index stacking issue with elements using the View Transitions API in Astro. While I can't provide a definitive solution from the given sources, here are a few general suggestions that might help:
-
As you mentioned, you could try setting a higher z-index on the elements that are being covered. This is a common CSS technique for controlling the stacking order of elements.
-
Review your use of the
transition:nameattribute to ensure it's being applied correctly. The View Transitions guide mentions how to use this attribute, but doesn't discuss overlap issues. -
Check if the problem occurs with Astro's built-in animations. The Built-in Animation Directives section describes some pre-defined animations that might behave differently.
-
If you're using custom animations, you might need to adjust your CSS to account for the stacking context during transitions.