January 9, 2003, 10:42 PM ET
Recommended reading
A few links of interest to designers and developers of online news/information sites:
- Matt Jones: The Glass Wall.
"A document detailing the design process behind the BBC homepage."
Fascinating, and beautifully explained. - Anne Conneen: The Best Designed News Sites
- Steve Yelvington: What are the best-designed news sites?
"Good Web design is interaction design, not 'how it looks' design."
- Nathan Ashby-Kuhlman: Name your sections carefully.
"Online editors might want to ask themselves whether their section names will still be appropriate 10 years from now."
- Columbia Journalism Review: Sixty-Seven Young Journalists and the Newspaper of Their Dreams. So what if I'm one of the journalists quoted? There are some good ideas here.
- Editor and Publisher: Newspaper Outsiders Offer Tips for Web Sites
- Steve Outing: New Year Resolutions: Fix Archives, Ban Pop-ups
January 9, 2003, 9:51 PM ET
Blocking stylesheet rules from Safari
Mark Pilgrim has asked: Should Apple's new Safari browser have an intentional CSS-parsing bug that Web developers can exploit to hide specific styles from that browser? My answer: I don't know. But, just for fun, here's what that could look like.
/* Begin Safari v1.0 hide */
styles_to_be_hidden {
...
}
/* End Safari v1.0 hide */
It's that simple. Safari would ignore anything between those two comments. As an advocate of Web standards, I don't necessarily approve of such a technique. But here are a few devil's-advocate thoughts on why this should happen:
- A need for this feature is inevitable. As Mark says,
"Safari will presumably become the default browser on Mac OS X at some indeterminate point in the future, so lots of people will use it...CSS hiding hacks are evil, but the alternatives are worse."
- It's easy to read. Any Web developer would be able to discern the purpose of this code by glancing at the comments.
- It doesn't use any ridiculous combinations of slashes, asterisks and God-knows-what-else. Other CSS hacks, most notably the Box Model Hack, do.
- It validates properly. The style-sheet validator ignores anything within comment marks.
- It should be easy to implement in Safari. It's as easy as trimming anything between those comments.
- It's future-proof. As the Safari developers release new versions, they could upgrade the hack. Hence, something hidden with
/* Begin Safari v1.0 hide */would always be hidden from version 1.0 Safari browsers (obviously) -- but in, say, version 1.2, after the Safari developers have fixed the bugs that encouraged Web developers to use the v1.0 hack in the first place, the new browser would not ignore the 1.0 hack anymore. Instead, it would provide a means for designers to hide code from the new version:/* Begin Safari v1.2 hide */. And so on, and so forth, until all browser bugs have been eliminated..

Post a comment:
Comments on this entry are closed.
Don't see any comments? That's because my Web hosting provider has made a server upgrade that broke the commenting feature on this site. I'm working to restore that; please check back later.