Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should centered modal <dialog>s support vertical writing modes? #2185

Closed
domenic opened this issue Dec 15, 2016 · 10 comments
Closed

Should centered modal <dialog>s support vertical writing modes? #2185

domenic opened this issue Dec 15, 2016 · 10 comments
Labels
needs implementer interest Moving the issue forward requires implementers to express interest

Comments

@domenic
Copy link
Member

domenic commented Dec 15, 2016

Moved from https://www.w3.org/Bugs/Public/show_bug.cgi?id=21770.

https://html.spec.whatwg.org/multipage/forms.html#centered-alignment specifically talks about the top/bottom positioning and margin of a dialog element. In that bug it was brought up that ideally it should instead talk about the block direction, so that it works well with vertical writing modes.

@mattto said:

I don't think think anyone has plans to implement this in Blink though, unless <dialog> gets more usage and there's demand for vertical writing mode support.

So to me this comes down to a question of what Gecko wants, since they are actively implementing dialog right now. If they want to support vertical writing modes, we can change the spec, and Blink will be in violation. Whereas if they want to just be compatible with Blink, we will leave the spec as is.

Thoughts, @smaug---- and @nt1m?

@smaug----
Copy link

This sounds like a case which should be supported, just to treat various languages as equally as possible.
Maybe some CSS folks have opinion on this. @fantasai perhaps?

@domenic
Copy link
Member Author

domenic commented Dec 15, 2016

Yeah, I think it's clearly better to support the vertical writing modes; it's just a matter of implementer will. And we don't have that from Blink, which is 1/2 of the implementations of dialog :(. So that's why I'm asking Gecko specifically.

@domenic
Copy link
Member Author

domenic commented Dec 15, 2016

I also wonder why the vertical centering is implemented in prose instead of in CSS. There must be a history there... @mattto? https://www.w3.org/Bugs/Public/show_bug.cgi?id=20418 has some history but seems to be taking it as a given that we want to use an algorithm for this instead of CSS.

@nt1m
Copy link
Member

nt1m commented Dec 16, 2016

Agreed with smaug, it makes sense for accessibility and it's quite straightforward to take care of (simple CSS change).

@mfalken
Copy link
Contributor

mfalken commented Dec 16, 2016

I also wonder why the vertical centering is implemented in prose instead of in CSS. There must be a history there... @mattto?

@tabatkins might know the history more. Do you mean why vertical centering was specified for dialog itself rather than as a CSS feature? It could be that it depended so much on centering as part of the showModal() call which included placing the dialog in the top layer.

@mfalken
Copy link
Contributor

mfalken commented Dec 16, 2016

Ahh.. just remember some history is captured here:
https://groups.google.com/a/chromium.org/forum/#!topic/webkit-layout/-B56yKjTYdI

I think we wanted to make it a CSS property but it was too difficult to spec the "center-when-first-shown-and-keep-that-position" property without depending on a function like showModal() being invoked.

@tabatkins
Copy link
Contributor

Yeah, it really wants to invoke a notion of time that's somewhat awkward to do in CSS (being a mostly-stateless programming language).

I mean, we have the right primitives - we invoke animations on a similar trigger - it's just awkward.

@domenic
Copy link
Member Author

domenic commented Dec 20, 2016

I think we wanted to make it a CSS property but it was too difficult to spec the "center-when-first-shown-and-keep-that-position" property

I must be missing something basic. How is that different from position: absolute; margin: auto; top: 0; bottom: 0; left: 0; right: 0; height: fit-content;?

@mfalken
Copy link
Contributor

mfalken commented Dec 21, 2016

Not sure. I think that centers relative to the ICB but not the viewport? https://jsfiddle.net/wzbxo5a1/

@domenic
Copy link
Member Author

domenic commented Dec 21, 2016

Ah cool, good catch.

Since it sounds like Gecko is interested in implementing this as logical positioning, I'll change the spec.

domenic added a commit that referenced this issue Dec 21, 2016
zcorpan pushed a commit that referenced this issue Mar 23, 2017
zcorpan pushed a commit that referenced this issue Mar 24, 2017
@zcorpan zcorpan added the needs implementer interest Moving the issue forward requires implementers to express interest label Apr 3, 2017
inikulin pushed a commit to HTMLParseErrorWG/html that referenced this issue May 9, 2017
inikulin pushed a commit to HTMLParseErrorWG/html that referenced this issue May 9, 2017
alice pushed a commit to alice/html that referenced this issue Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs implementer interest Moving the issue forward requires implementers to express interest
Development

No branches or pull requests

6 participants