RE: [CSS21] Why are browser default style values different from Appendix D

Hello,

The bug you are talking about is not relevant here because the default margins being set are auto (resolved to 0) whether the container hasLayout=true or false. (Arron is the creator of these tests and can explain further if needed.)

Also, IE7 data does not really impact the discussion here. Majority of existing implementations are doing something different (from IE7 and the spec) in this case.

Thanks,
Saloni

-------------------------------------
Saloni Mira Rai
IE Developer Experience PM
425-421-8505
http://blogs.msdn.com/saloni


-----Original Message-----
From: Alan Gresley [mailto:alan@css-class.com]
Sent: Friday, May 02, 2008 1:28 AM
To: Saloni Mira Rai
Cc: Ph. Wittenbergh; CSS; Alex Mogilevsky
Subject: Re: [CSS21] Why are browser default style values different from Appendix D

Saloni Mira Rai wrote:
 > From: Ph. Wittenbergh wrote:
 > On May 2, 2008, at 9:01 AM, Saloni Mira Rai wrote:
 >
 >> I edited Alan's webpage to fix the #NAME errors.
 >
 > Thanks for that.
 >
 > A question:  how did you obtain those values ?
 >
 > Regarding IE (7)
 > The default margins for the UL in your table are reported as (0 0 0
 > 30pt). That is incorrect. According to the Dom toolbar the values are
 > 'auto', and margin-left:30pt.
 >
 > The '0' would only be true if the UL is the first and only child of
 > <body> (body is _always_ a 'hasLayout' container).
 > A quick, eyeballing, test here shows the default top/bottom value
 > (@default font-size) to be 20px - approx 1.15em.
 >
 >
 > Philippe
 > ---
 > Philippe Wittenbergh
 > http://l-c-n.com/

> I used an internal test suite which essentially uses the style object to query for values in all browsers. Each test has the element has the only child of body. It reports an "incorrect" style when it doesn't match the value in the default stylesheet.
>
> So this table is reporting computed values in pixels, which why you see 0 instead of auto.
>
> Thanks,
> Saloni

Hi Saloni

All default 'margin-top' of OL, UL, H1, H2, H3, H4, H5, H6, P and other
elements (with defaults) will show 'zero' when the the container has
hasLayout=True [1]. Since the BODY element has hasLayout=True by default
[2] in IE5~IE7 then all these 'margin-top's will disappear [3]. What
Phillip has said is correct. You may want to ask Alex Mogilevsky about
hasLayout. He may be just down the corridor at your work. :-)


[1] http://www.satzansatz.de/cssd/onhavinglayout.html
[2] http://msdn.microsoft.com/en-us/library/ms533776(VS.85).aspx
[3] http://css-class.com/test/css/box/margins/iehaslayoutmargins.htm


Alan

http://css-class.com/test/

Received on Monday, 5 May 2008 20:20:34 UTC