[whatwg] Modal dialogs in HTML5

Ian Hickson schrieb:
> On Thu, 18 Dec 2008, Philipp Serafin wrote:
>   
>> There is no reasoneable "default size" the page could adjust to. If the 
>> author can't specify the size of a popup/dialog, what algorithm should 
>> the UA use to find out the correct optimal size?
>>     
>
> Lay out the page at infinite height and width, then shrink the width until 
> you get to the narrowest width that doesn't cause any overflow or line 
> wrapping, then shrink the height until you get to the shortest height that 
> doesn't cause overflow, then center it over the originating window.
>
>   
Point taken. In that case, if you really really needed, you could even 
still control the size explicitely via the width ang height CSS properties.

I think it would be a good idea to spec this algorithm as well then.

You still might want to keep the parameter for back compat though and 
just mark it as "deprecated". (Your algorithm would deform existing 
popup windows that assume their lengthy descriptions get line-wrapped 
automatically.)

Regards,
Philipp Serafin

Received on Thursday, 18 December 2008 10:54:03 UTC