W3C home > Mailing lists > Public > public-css-testsuite@w3.org > January 2011

Re: [RC4] margin-left-001 invalid

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Mon, 10 Jan 2011 17:27:11 -0800
Message-ID: <f1f53482a95f171ef17bd71225c77a73.squirrel@cp3.shieldhost.com>
To: "Arron Eicholz" <Arron.Eicholz@microsoft.com>
Cc: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>

Le Lun 10 janvier 2011 16:17, Arron Eicholz a écrit :
> http://test.csswg.org/suites/css2.1/20101210/html4/margin-left-001.htm
>
> The HR element is by default per HTML4.01 set with align=center this has
> no mapping in CSS 2.1

Consider that HR element is a block-level element and it's empty by
design: it has no inline boxes. So, the attribute specification
align=center can not be mapped to and should not be mapped to
'text-align: center' in CSS. It has to be with 'margin-left: auto' and
'margin-right: auto'.

HTML4 states it is aligned "with respect to the surrounding context".
http://www.w3.org/TR/html4/present/graphics.html#h-15.3

> and thus setting margin-left on the HR element
> still may do nothing if the align attribute isn't overridden which can
> be the case.
>
> This case should be removed from the CSS 2.1 test suite because it is
> testing an assumption of how HR elements are handled in CSS which isn't
> clear.

Where should the following <div> go in this example?

div
{
border: 1px inset;
margin-left: 0px;
width: 33%;
}

<body>
 <div></div>
</body>

Now, why should it be any different for <hr> then?

http://mxr.mozilla.org/mozilla/source/layout/style/html.css#385

http://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css#L122

http://websvn.kde.org/*checkout*/trunk/KDE/kdelibs/khtml/css/html4.css?content-type=text%2Fplain

regards, Gérard
-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 test suite (RC4; December 10th 2010):
http://test.csswg.org/suites/css2.1/20101210/html4/toc.html

CSS 2.1 test suite contributors:
http://test.csswg.org/source/contributors/
Received on Tuesday, 11 January 2011 01:27:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 01:28:00 GMT