[whatwg] Comments on <dialog>
Matt Falkenhagen
falken at chromium.org
Tue Apr 23 00:05:16 PDT 2013
Thanks for your response. I just have one comment.
On Tue, Apr 23, 2013 at 4:38 AM, Ian Hickson <ian at hixie.ch> wrote:
> On Mon, 22 Apr 2013, Matt Falkenhagen wrote:
>> 4. Why isn't the dialog horizontally centered in the viewport? The spec
>> just mentions vertical centering and 'top'.
>
> The horizontal centering is done via the default CSS. The vertical
> centering can't be done with CSS, hence all the prose about it.
The default CSS gives the dialog a 'left' and 'right' of zero. I think
this means that to achieve horizontal centering without actually
filling the viewport horizontally, you must set 'width' to something
other than 'auto'. Would it be useful for the width to be
shrink-to-fit if it is 'auto' and then the dialog be centered
horizontally? Or is that not a common use case?
More information about the whatwg
mailing list