W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2020

Re: [csswg-drafts] [dialog element] <dialog> positioning should be describable in CSS (#4645)

From: Keith Grant via GitHub <sysbot+gh@w3.org>
Date: Mon, 09 Mar 2020 18:36:54 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-596711399-1583779013-sysbot+gh@w3.org>
> Together with selecting on [open], I think this should allow for animations and transitions of most aspects of dialog layout.

When browsers first added support, this allowed for animating in, but not animating out. Once the dialog closed, it was immediately removed from view by the browser and no CSS I tried was capable of altering this behavior...

This still seems to be the case in Chrome, though Firefox has improved things a little. In Firefox, `display: block` can be used to show a "closed" dialog (so e.g. a fade-out animation can be applied on close). Firefox positions the dialog with an inline `top` and `z-index`, which are only added while open, so these would have to be manually re-calculated to match after the close attribute is removed. In any case, it seems browsers are taking a kind of "whatever works" approach to how these are styled & stacked in a top rendering layer — getting those clearly defined will be a win.

-- 
GitHub Notification of comment by keithjgrant
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4645#issuecomment-596711399 using your GitHub account
Received on Monday, 9 March 2020 18:36:56 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:02 UTC