Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It is too clever for its own good, but the "reliable cross-browser reliable" critic is way too MSIE friendly: The code is all standards based. There are no vendor-specific prefixes such as -webkit or -moz.

The best method of obtaining maintainable code is to avoid buggy browsers that need tons of workarounds and hacks.



Actually if you read the source code he explicitly says:

	   /* AFAIK, not supported in moz/o[pera] yet */
and :target has incomplete browser support still. Nested <a> tags are a bit unusual, too, even if they are legal (is this valid? I don’t even know, because come on!)

But I’d like to make a slightly broader point that, on the web, if you want something to work on as many clients (and that means on hundreds of different mobile browsers as well, these days) then sticking to the mainstream is your best bet, if perhaps boring :)


"Nested <a> tags are a bit unusual, too, even if they are legal (is this valid? I don’t even know, because come on!)"

As it happens I've been fiddling with the HTML 4.01 DTDs in a project the past couple of weeks, and I can answer this for at least HTML 4.01: No. An A element may contain any inline element except for another A tag, which is explicitly denied.

(It isn't entirely clear to me whether the standard permits something like <a><b><a> or if the exclusions apply to all children, but the latter interpretation makes more sense.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: