- From: Maciej Stachowiak <mjs@apple.com>
- Date: Sun, 21 Mar 2010 13:11:35 -0700
- To: "L. David Baron" <dbaron@dbaron.org>
- Cc: HTMLwg WG <public-html@w3.org>
On Mar 21, 2010, at 9:14 AM, L. David Baron wrote: > On Sunday 2010-03-21 08:22 -0400, Sam Ruby wrote: >> youtube.com: >> >> What interop issues are solved by disallowing div elements inside of >> span elements? > > Blocks inside inlines can, in some cases, cause larger numbers of > CSS boxes to be present than the author probably expects, which I > believe in some cases causes performance degradation. (I've seen > cases in the past where such performance degradation was > significant, although those cases may have been fixed in our > implementation.) > > In many cases, the author intends the outer element to have block > formatting. In the other cases, I believe the resulting formatting > is non-tree-like, which confuses the mental model of the HTML > element structure representing a tree. Good point. Blocks inside inlines create a very strange render tree and this can have unexpected side effects. I have had to help web developers at Apple with problems resulting from this a couple of times. On the other hand, HTML5 allows nesting block-level elements inside the <a> element. Perhaps in that case the benefits exceed the costs. (Note for Leif: neither <caption> nor the <hn> elements are inlines.) Regards, Maciej
Received on Sunday, 21 March 2010 20:12:14 UTC