Looks like window dimensions are not being updated dynamically Before resizing  After resizing 