Closed fsmeier closed 1 month ago
@fsmeier Hi,
Internally we use Popper.js for positioning the dropdowns. We assume that
Popper.js or similar positioning libraries often rely on the calculated position and dimensions of elements to calculate the popper placement. If the parent element has a backdrop-filter
property, the browser may handle rendering of this element in a different layer, causing small shifts or miscalculations in how Popper.js interprets the position.
We propose to use a separate element that will contain the necessary styles for such cases, and position it relative to the parent.
I created a fork where I showed how this can be implemented.
Summary
If you use the dropdown together with backdrop-blur-md the dropdown is positioned wrong within the navbar.
Steps to Reproduce
backdrop-blur-md
to the navbar elementDemo Link
https://stackblitz.com/edit/preline-v2-astro-ljhc4h?file=src%2Flayouts%2FLayout.astro
Expected Behavior
The dropdown-menu should be positioned correctly (like without the backdrop-blur class)
Actual Behavior
The dropdown-menu is positioned wrongly when backdrop-blur-md is used.
Screenshots