Typography
[11:58:09 AM]
Update: This post was fundamentally wrong. You *can* use a transitional DTD without being thrown into quirks mode. You just have to know *which* way to specify the DTD. *Without* a URL, you get quirks-mode. You can get standards mode, or Mozilla/Gecko's 'nearly-standards' mode, by choosing the right DTD declaration. You just have to know. Here's the Mozilla/Gecko behavior [mozilla.org].
Cost of DTD hijacking.... (Choosing quirks mode based on transitional dtd considered costly.)
We have this problem of a gazillion web pages that were tailored to now-old browsers that were definitely quirky about rendering. "Quirky" being partly a euphemism for "non-standard".... A browser that does things *right* will suddenly gag on these old pages (render them ugly). So you might want the new browser to be able to render an old-fashioned page the way the old-fashioned browser rendered it. But how will the browser know to use quirks mode, not standards mode?
You use the DTD, was the answer. The DTD had (practically) never been used for anything, so why not?
I'm glad *I* didn't have to make a decision like that. For me, I would have been glad if a transitional DTD let me make pages that would work pretty well in non-CSS browsers, *without* enforcing old bugs (etc.) when someone uses a new browser to look at the page.
The example is you might want to use bgcolor, link, and vlink in the body tag, and even the despised but functional font tag. But if you use a transitional DTD, Mozilla duplicates various nasty 1997-era bugs. So now if I want to use transitional tags, I've got to do all the work-arounds that we hated before. In order to avoid the old bugs, you have to give up usability for old browsers.
Here's an example.... You put a div around the "content" part of the page, and style based on the div. Everything within the div looks fine, until you have some tabular data -- in a table. Because you use a transitional DTD -- in Mozilla and other browsers -- the text in the table cells doesn't get the styling of the div. That's not necessarily so bad, because you can style the contents of the table cells. But with the cascading nature of CSS, if a browser comes along that *doesn't* support quirks mode, the styles could be applied twice: .9em times .9em. So don't use ems, right? Ouch.
I have a different perspective on this than some. I don't care if old pages look bad in new browsers. People who want their websites to look pretty can update their pages, from my perspective. I would rather that it be easy to make new pages that follow standards with a bit of a nod to downward compatibility.
Like I say, I'm glad *I* didn't have to make these decisions, because I would have leaned the other way.
[9:41:11 AM]
Interesting claim on the Opera/MSN story.... They suggest MSN tweaked a stylesheet to work better with Opera 6. When Opera 7 came out, the tweaked stylesheet broke the layout, because of changes in the browser. I haven't tested this, but it sounds plausible (slashdot comment).
First, make your browser follow the standards. Second, when browser-sniffing, be aware that new versions will come out eventually, and the new versions will be specifically *different* than the current version. So limit your targeting to known versions. When Opera 7 comes out, give it some generic stylesheet until you take the time to figure out what you need to do to support it.
[9:12:33 AM]
I guess that makes it official, then. I am the Anti-zeldman [google.com]. (ha ha)
Copyright © 2003 Licentious Radio.
Last update: 9/20/03; 2:57:20 PM.