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

Details on the proposal:
* The dialog is assigned to the "top layer" (which needs to be defined in css-position-3 once it's rewritten).
* DOM snapshots the top/bottom of the viewport as inset property values when the dialog is opened, and rewrites those values if the viewport is resized.
* The dialog is also assigned `align-self: safe center`; this takes care of the centering within the viewport.

I think the one question I can think of wrt CSS interaction is where the `inset` values are injected, if it's at the preshint level or into the style attribute or something else. Depends on what's reasonably implementable and what's reasonably Web-compatible...

@keithjgrant Together with selecting on [open], I think this should allow for animations and transitions of most aspects of dialog layout.

@annevk Does that make sense, or do you need more info for the HTML spec parts of this?


-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4645#issuecomment-596024077 using your GitHub account

Received on Saturday, 7 March 2020 00:56:55 UTC