terrymun/Fluidbox

fluidbox-overlay not expanding to viewport if an ancestor has a transform property

marcofugaro opened this issue · 3 comments

I just came across a little bug, if I apply Fluidbox to an element and its parent or any anchestor has a tranform property set, the white backgorund (fluidbox-overlay which has a position: fixed and top left bottom right to 0) expands only to that element and not the whole viewport.

This is due to this css issue, and I don't think there are any easy and worth fixes. We could try putting it in position: absolute and wrapping the whole body with it, but I personally think this isn't worth it.

Just tought you might want to know this and maybe add it to the Known Issues section.

Added to the readme in 2705f73. Thank you :)

I've just come across this issue, is there a workaround? Setting the overlay to have width: 100vh makes sense to me but not sure where to go from there.

Edit: Sorted it.

width: 100vw;
transform: translate(-50%);
left: 50%;
right: 50%;

this is still an issue when using fluidbox within a slider such as swiper.js