Re: [whatwg] div as a wrapper for inline content
On Jan 4, 2007, at 02:58, Ian Hickson wrote: Yes, it is used as a way to step around strictness requirements. It's a bug in HTML4 that people have been abusing, as far as I can tell. ... We have to balance making life easier for early adopters with making life better on the long run. OK. What's the use case for div elements containing inlines? It seems to me that the usual use case is avoiding p, because the author is too shy to claim that the particular piece of inline content constitutes a paragraph or the author doesn't want to undo the default style for p. -- Henri Sivonen [EMAIL PROTECTED] http://hsivonen.iki.fi/
Re: [whatwg] div as a wrapper for inline content
I changed the conformance checker technology preview to only accept block content in div. To keep it self-validating, I changed divs to ps in the output. I also had edit Anne's WF2 tests to make the regression tests pass. Let's see how badly this scares early adopters. -- Henri Sivonen [EMAIL PROTECTED] http://hsivonen.iki.fi/
Re: [whatwg] div as a wrapper for inline content
On Thu, 04 Jan 2007 01:58:34 +0100, Ian Hickson [EMAIL PROTECTED] wrote: It depends if by early adopters you mean people who just change the DOCTYPE, or people who actually switch to using the new elements. We have to balance making life easier for early adopters with making life better on the long run. What's the use case for div elements containing inlines? It seems to be mostly used for constructs HTML5 solves by having a native element for it, like: div class=date01-01-2007/div diva href=...img src=... alt=.../a/div ... Early adopters, however, can't really use the new elements due to crazy parsing. -- Anne van Kesteren http://annevankesteren.nl/ http://www.opera.com/
Re: [whatwg] div as a wrapper for inline content
On Thu, 04 Jan 2007 00:58:34 -, Ian Hickson [EMAIL PROTECTED] wrote: What's the use case for div elements containing inlines? From microformats.org: div class=vcard a class=url fn href=http://tantek.com/;Tantek Çelik/a div class=orgTechnorati/div /div It can be generalized to when div is used in place of elements with inline content model and which are not in HTML. The simplest example could be div class=h7. -- regards, Kornel Lesiński
Re: [whatwg] div as a wrapper for inline content
On Thu, 4 Jan 2007, Kornel Lesinski wrote: On Thu, 04 Jan 2007 00:58:34 -, Ian Hickson [EMAIL PROTECTED] wrote: What's the use case for div elements containing inlines? From microformats.org: div class=vcard a class=url fn href=http://tantek.com/;Tantek Çelik/a div class=orgTechnorati/div /div If that's an address: p class=vcard a class=url fn href=http://tantex.com/;Tantek Ccedil;elik/a br span class=orgTechnorati/span /p But yeah, I see what you're saying... Hmm. I guess we could say it is block-or-structured-inline-but-not-both, like most of the other elements. That still prevents things like: div ... p ... /p /div ...and: div h1.../h1 ... /div ...which are what I'm trying to avoid here. It can be generalized to when div is used in place of elements with inline content model and which are not in HTML. The simplest example could be div class=h7. sectionh1 handles that case. -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
[whatwg] div as a wrapper for inline content
I suspect requiring the content model of div to be block only might be an annoyance as far as a smooth upgrade path goes. Extremely superficial anecdotal evidence suggests that even making the content model bimorphic makes some Strict blogs not conform to an (X)HTML5 draft grammar. It seems to me that div is often used as an adapter that allows DTD- valid Strict pages to put inline stuff where the DTD wants block. I can see why this might be unpleasant or inelegant, but do we really want to annoy the potential early adopters who are now using such tricks to make their pages valid as Strict? (The easy way to weasel out is, of course, to state that a div that only has inline content constitutes a paragraph. And, behold, paragraphs with struct-inline children become possible in text/html as a side effect. :-) (I don't have a proper opinion here, at least not yet, but requiring block content makes my a bit uneasy considering practice even though I agree in principle.) -- Henri Sivonen [EMAIL PROTECTED] http://hsivonen.iki.fi/