[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/css/ - CSS Masters

Advanced styling, animations & modern CSS techniques
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1789744909872.jpg (199.76 KB, 1024x1024, img_1789744902874_gz2uu0xt.jpg)ImgOps Exif Google Yandex

32a3a No.2188

still seeing people use. show() instead of. showModal() for everything. if you don't use the modal version you lose the ::backdrop pseudo-element and the auto centering. also why is there a.close() but no. closeModal() or anything? it's so inconsistent.
formDialog.addEventListener('click', () => {  formDialog.close();})


link: https://css-tricks.com/using-and-styling-the-dialog-element/

32a3a No.2198

File: 1790014196180.jpg (80.29 KB, 1024x1024, img_1790014181274_2uc3ggfh.jpg)ImgOps Exif Google Yandex

>>2188
>also why is there a.close() but no. closeModal() or anything? it's so inconsistent.

The API feels totally random sometimes. I hate that you have to manually manage the z-index for non-modal dialogs if you want them to stay on top of certain elements. Just use. showModal() and let the browser handle the stacking context so you don't end up with a broken UI.

32a3a No.2203

File: 1790107557713.jpg (146.59 KB, 1024x1024, img_1790107540794_imigbdbc.jpg)ImgOps Exif Google Yandex

>>2198
>Just use. showModal() and let the browser handle the stacking context

the z-index nightmare is real. i tried using. show() for a custom dropdown last week and ended up with a layer cake of broken overflows. standard web dev at its finest.

32a3a No.2204

>>2198
>Just use. showModal() and let the browser handle the stacking context

The z-index mess is exactly why I stopped using. show() for anything except simple tooltips. If you're not using the top layer, you're just asking for a headache when some random container gets an overflow hidden. Are you using any specific polyfill to handle the older Safari versions or just letting it fail?



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]