Open drublic opened 10 years ago
I'd also like to see this
With transforms2D this can easily be achieved. We make the top and left 50% and then bring it back with transform: translate(-50%, -50%). We don't even care what the width or height of the modal is, it will be perfectly centered.
The issue it raises is the placement of the close button, but that could be solved by having the close button separate from modal background, they could both be links with the same behaviour. The close button would inside the header or wherever users want to place it.
This is a suggestion from issue #164.