Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Modal containers should be position: fix; with their own internal flexbox or grid btw.


Not always. That's assuming you have a full viewport modal. There are plenty of instances where you'll have a modal inside of another container somewhere on the page.

You also generally don't want to use position: fixed as it can allow the user to scroll behind the modal.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: