[whatwg] HTML syntax: shortcuts for 'id' and 'class' attributes
Ian Hickson
ian at hixie.ch
Fri Dec 1 09:11:25 PST 2006
On Thu, 30 Nov 2006, Boris Zbarsky wrote:
>
> No, because an HTML4 UA will not render that in any sort of reasonable
> way (for example, in an HTML4 UA the "p.myclass" tag will never be
> closed).
This exactly summarises why we can't do this.
On Thu, 30 Nov 2006, Andrew Fedoniouk wrote:
>
> Boris, what about this then:
>
> <p .myclass> ... </p>
> <p #myid> ... </p>
>
> (tag name and attribute delimeted by space)
>
> Can this be considered as enough backward compatible ?
I don't really see how this would be particularly beneficial. Saving two
characters to specify an ID (and 5 for a class) at the cost of losing
compatibility with all legacy UAs, seems pointless.
On Fri, 1 Dec 2006, Robert Sayre wrote:
>
> No. Try this rule of thumb: don't invent anything unless you absolutely
> have to, or you're giving a name to something that is already happening.
Exactly.
On Fri, 1 Dec 2006, Andrew Fedoniouk wrote:
>
> Let's imagine that there are no such things as HTML5 and WHATWG yet.
> Only HTML 4.1, CSS and JavaScript in the wild.
>
> And here comes someone who will tell us: "Hey, something wrong in this
> triade - it is not serving needs of Web Applications well. So let's
> start from HTML."
>
> "No. Try this rule of thumb: don't invent anything unless you absolutely
> have to, or you're giving a name to something that is already
> happening."
>
> Absolutely applicable! Isn't it?
Yes... that's why we're not inventing anything unless we absolutely have
to. Like <canvas>, or <datagrid>, or the various other new features in
HTML5. (There aren't that many. They're all pretty vital.)
> In other words: what is so conceptually wrong with HTML 4.01 that
> requires HTML5 to be designed?
HTML5 is HTML4, just better defined (fixing bugs in HTML4) and with a few
new features to handle things HTML4 couldn't do.
Please let me know if there is something that was said in this thread that
deserves further reply; I don't think there was (mostly this thread was
people disagreeing with Andrew or off-topic discussion).
Cheers,
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list