Re: Default margins for new elements

On Sat, Jul 18, 2009 at 1:40 PM, Simon Pieters<simonp@opera.com> wrote:
> I set up a user style sheet with
>
> article, aside, figure, nav, section {
>  margin-top: 1em; margin-bottom: 1em;
> }
>
> taken from
>
> http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#margins-and-padding
>
> Clearly, authors don't expect these elements to have default margins.
>
> I suggest that article, aside, nav and section not have default margins.
> figure has default margins on the left and right, so could keep the top and
> bottom margins too.
> dialog could maybe have default top and bottom margin, just like dl.

As a front-end web developer, I fully agrees with Simon, I consider
article, aside, figure, nav, section as semantic div (so margin: 0),
figure as a p (margin: 1em 0; perhaps a specific text-align: center;),
and dialog as a list (ul/ol/dl, so margin: 1em 0;). And all the french
tutorials about the new elements in HTML5 ([1][2]...) present the new
elements this way.

The side margin on figure could perhaps be more elastic (margin: 1em
10%;), but it's also logical to have the same value than li/dd.

[1] http://www.alsacreations.com/article/lire/750-HTML5-nouveautes.html
[2] http://romy.tetue.net/elements-html-5-de-structure

-- 
Olivier G.
http://identi.ca/lespacedunmatin
http://www.lespacedunmatin.info/blog/

Received on Wednesday, 22 July 2009 14:46:37 UTC