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

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

From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
Date: Wed, 10 Jun 2020 16:45:31 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-642130060-1591807530-sysbot+gh@w3.org>
The CSS Working Group just discussed `[dialog element] <dialog> positioning should be describable in CSS`, and agreed to the following:

* `RESOLVED: We switch dialog positioning to rely on centered fixed container with max-height and overflow:auto pending use counter data`

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: [dialog element] &lt;dialog> positioning should be describable in CSS<br>
&lt;dael> github: ttps://github.com/w3c/csswg-drafts/issues/4645<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/4645<br>
&lt;dael> emilio: Started looking into dialog and whole positioning for abspos dialog is weird. Have to snapshot scroll psoition at time you open.<br>
&lt;dael> emilio: I think it's not common since most dialogs I know are fixedpos and height of screen at most<br>
&lt;dael> emilio: Some discussion in the past. I wonder what is model people feel we should have. fantasai prop snapshot scroll position in dom and apply that<br>
&lt;dael> emilio: I think I would like simplier and make dialogs fixedpos, scrollable with max-height is the screen height. Only Chrome ships dialog so I'd like to know their feelings<br>
&lt;dael> TabAtkins: Played a bit. Does ability to anchor a dialog to a mouse event exist or is it limited to dialog center on screen<br>
&lt;fantasai> issue was about describing the behavior specced in HTML, didn't look into making fundamental changes to it :)<br>
&lt;dael> emilio: I don't think we can attach to an element<br>
&lt;dael> TabAtkins: If we ever do want to attach to an element some mech is the thing being used to position non-anchor dialogs. If we switch non-anchor to fixedpos we have to figure out how to do it for non-anchored.<br>
&lt;dael> iank_: I think a different solution for anchoring down the road<br>
&lt;dael> iank_: I tried to work out where this originally came from. It was something like 8 years ago. Only concern I have is webcompat. Given we're only shipping it might be fine. Want to add use counters to see what sites are triggering. Otherwise changing to fixed height and overflow auto sounds fine<br>
&lt;dael> emilio: Other weird thing is reposition dialog when viewport resizes. That just feels weird.<br>
&lt;dael> iank_: Dialog should always be centered given abspos constraint<br>
&lt;dael> emilio: Agree. Whole snapshot is redone when viewport is resized<br>
&lt;dael> iank_: Sure. DOn't disagree this is crazy behavior<br>
&lt;dael> iank_: I'll add a blink use counter to determine when we're snapshotting a non-0 scroll position. That should cover it and give us insight in web compat<br>
&lt;dael> TabAtkins: Okay resolve pending data showing we can't this is the way to go?<br>
&lt;dael> iank_: fine<br>
&lt;dael> TabAtkins: Prop: We switch dialog positioning to rely on centered fixed container with max-height and overflow:auto pending use counter data<br>
&lt;dael> smfr: Only for mobile and therefore in top layer?<br>
&lt;dael> TabAtkins: Yeah<br>
&lt;dael> smfr: Don't have to worry about transforms b/c not in top layer?<br>
&lt;TabAtkins> s/mobile/modal/<br>
&lt;dael> TabAtkins: Yeah<br>
&lt;dael> chrishtr: Does thia mount to styling same as fulls creen element?<br>
&lt;dael> TabAtkins: Yeah<br>
&lt;dael> chrishtr: It would just allow a margin?<br>
&lt;dael> iank_: top left at 0 but margins are auto which centers<br>
&lt;dael> chrishtr: Only difference it margins, sounds good to me. Recently reviewed full screen so this is not a problem<br>
&lt;dael> hober: Seems good if they converge since intended to use same underlying<br>
&lt;dael> astearns: Do we need to be explicit about connection?<br>
&lt;dael> hober: Are since use notion of top layer. A lot of refactor on full screen spec that could move some of this to other specs<br>
&lt;dael> chrishtr: Is dialog in a css spec?<br>
&lt;dael> TabAtkins: Just in ?? right now<br>
&lt;dael> chrishtr: Can we define where we'd put it when work is done?<br>
&lt;dael> TabAtkins: I think it's still fine for special styling rules to live in html spec. Only if we're adding new functionality should it be in css.<br>
&lt;dael> chrishtr: THe rendering monkeypatches need to be moved<br>
&lt;AmeliaBR> s/??/HTML/<br>
&lt;dael> tab: We're planning to kill those<br>
&lt;dael> AmeliaBR: One new magic thing is idea of top layer. Is that desc?<br>
&lt;dael> TabAtkins: Have an open issue for it in positioning spec<br>
&lt;dael> AmeliaBR: Needs to be defined and than html can define dialog as rendered in top layer with these properties. Than we solve dialog being desc by css tems in the html spec<br>
&lt;dael> chrishtr: Sounds right and same for full screen<br>
&lt;dael> florian: And if there is not css terms to desc we should create it rather than have it be magic<br>
&lt;dael> fantasai: Desc top layer is a sep open issue<br>
&lt;dael> astearns: Any magic aside from top layer?<br>
&lt;dael> TabAtkins: Assuming we use prop from earlier no. It's just a fixedpos container<br>
&lt;dael> chrishtr: top layer is in a special place b/c it's above scrollbars<br>
&lt;dael> TabAtkins: Yes. As fantasai said describing the top layer is a sep issue<br>
&lt;dael> astearns: Have open issue for top layer, we will define that. For this issue we're going to resolve that We switch dialog positioning to rely on centered fixed container with max-height and overflow:auto pending use counter data<br>
&lt;dael> astearns: Any objections?<br>
&lt;dael> RESOLVED: We switch dialog positioning to rely on centered fixed container with max-height and overflow:auto pending use counter data<br>
&lt;dael> astearns: Good to get to top layer definition soon so we can remove the magic.<br>

GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4645#issuecomment-642130060 using your GitHub account
Received on Wednesday, 10 June 2020 16:45:33 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:27:12 UTC