GWT Has Style
With Twitter unreachable right now, I guess I’ll put this here:
I plan to create a new theme for this blog, and am seeking opinions. Should I base my CSS on this Reset Reloaded stylesheet?
What do you do for your own sites?
After writing Best. Comment. Ever., I realized comment permalinks were not working on my blog. Clicking the link brought up the page, but failed to scroll to the comment.
Jörg offers this advice:
Firefox does right, and so does safari: You anchors name (”…#comment-7155″) contains a “-”, which is an invalid name. Try something like “#comment7155″, it will work.
While his suggestion served as a catalyst for me to finally investigate the problem, I was not convinced “-” was the cause. So I researched the HTML specification, which has this to say:
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens (”-”), underscores (”_”), colons (”:”), and periods (”.”)
Dashes are frequently used in URLs, so this cannot be the problem.
While my heavily customized WordPress theme defined links, it failed to define anchors or IDs. So the links were going nowhere. I had to edit comments.php and add this ID to a <div> tag:
<div id="comment-<?php comment_ID() ?>" class="comment">
And that fixed the problem. I also re-learned some things about HTML that I probably knew at one point, but forgot:
I suspect WordPress works fine out of the box, but I must have screwed it up when creating this theme.
Didn’t see this one coming…today the IEBlog breaks the IE 8 cone of silence:
Last week, we achieved an important milestone that should interest web developers. IE8 now renders the “Acid2 Face” correctly in IE8 standards mode.
Here is how Acid2 renders today, under IE7 on Vista:

Under IE8 “in standards mode”, the face renders like this:

Here is the first line of the Acid2 Browser Test test page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
That line actually puts IE7 into something called “Almost Standards Mode”, according to the Wikipedia Quirks mode article.
When you visit the Acid2 Browser Test page, will IE8 be in “Almost Standards Mode”, or will it render in “Standards Mode”?
The IEBlog did not make this clear. I found myself wondering if they did this:
Fortunately, the Video on Channel 9 clears this up. Fast forward to around 21:30 in the video to see that the smiley face renders correctly on the live site, not on a modified local copy.
This is really good news. Let’s hope they continue improving standards compliance in IE8 and beyond.
Microsoft just announced the next version of IE will be called…IE 8.
Add that to my “Wow” list.
My ideas for IE 8:
I guess the last bullet is another CSS issue. The previous bullet is probably more an issue with Microsoft web sites insisting on being IE proprietary, which sucks.
So, to summarize:
Make CSS Work.
With a sick child at home, I had some time this afternoon to play with Google Web Toolkit (GWT). Learning GWT has been on my “technologies to investigate” list for far too long; today I finally dove in. First impressions:
The comments for Oops, browser not supported are a good read. A few quick highlights include:
This highly technical graph shows why toolkits and libraries like YUI, GWT, Dojo, and others are inevitable:

I test my blog on my PC with two browsers: IE 7 and Firefox 2. I simply do not have the resources (time/money/desire/etc) to test on a variety of browsers and operating systems. But I do worry about it…
The graph shows a vertical dashed line. There comes a point where you have to support so many browser and device combinations that you simply cannot hand code a sophisticated site.
We’ve dealt with this issue for years and years and years. What makes it any different today than it was a few years ago?
So there you have it. I hope you enjoyed the graph. I wonder how that 453 pixel wide PNG looks on your cell phone?
Why would you want a map like this on your blog?

Everyone’s blog traffic looks like that. A bunch of dots blobs scattered across the globe with a void in Africa. Get rid of it.
How about this:

People do not visit your blog for the weather report.
And about that tag cloud…Jeffrey Zeldman called tag clouds the new mullet way back in 2005. (personally, I think goatees are the new mullet, but to each his own…)
Every person with a blog should read Banner Blindness: Old and New Findings. That article contains some really awesome heat maps that show what people actually look at on a web page.
I wonder why we spend so much time agonizing over how to create 3-column CSS layouts when people rarely look at those other columns anyway?
I think Russell Beattie’s Weblog has a fantastic style: clean, beautiful, and easy to read. I modeled my site after his, although I’m certainly no graphic designer.
Unfortunately many blogs look more like this:

Yuk.
Apple hardware design kicks ass:

Largely because they have the balls to remove extraneous features.
Corporate committees are the enemy of simplicity. Committees rarely produce anything inspiring. Instead, we get watered down politically correct pandering slop that tries to please every faction, while delighting nobody.
Your blog belongs to YOU. You do not have to answer to a committee! Be an evil dictator! Delete, purge, CLEAN UP! You can be Steve Jobs in your own little corner of the Internet.
Removing the clutter will make your blog better.
Your challenge is to remove something from your blog theme. Drop a calendar, a tag cloud, a map, a badge…whatever. Just go for simplicity.
(The hypocrisy of the gigantic ad on my own blog is noted…)
I just added “thought bubble” graphics to my blog comments. Scroll down to see the results.
Check out Comic: Wide-Stanced Programming for another post with a handful of comments.
I have no idea if this works in your browser. I tested on Vista using IE 7 and Firefox 2.0.0.9. It’d be great if people on other operating systems and browsers could let me know how the bubbles render.
Check out the calendar detail to the left of the post title. I created this with a combination of some simple div tags, two background images, and some CSS. It looks really good in Firefox, and “ok” in IE. If you change the text zoom size in IE, the borders get a bit flaky. I’m sure with a bit more hacking we can make it look better in more browsers.
This diagram shows how the div tags fit together:

Here is the CSS for the outer box:
.datebox {
width: 50px; /* same width as the background image */
float: left;
margin-right: 1ex;
margin-bottom: 1em;
}
The width matches the width of the background image, which is anchored to the top of the .month box. (shown next). The float tells the entire datebox where to go on the page, and the margins ensure text does not smash up against the box. The values 1ex and 1em are just pulled out of thin air. Other values work fine.
The month box contains the background image anchored to the top edge. It is important to know the exact color of this image so you can make the background color of the box match. Furthermore, the image must not be transparent, otherwise the background color of the box bleeds through the top edge of the image.
.datebox .month {
font-family: Cambria,"Times New Roman",Times,serif;
font-size: 0.9em;
padding-top: 0.3em;
padding-bottom: 0.1em;
text-align: center;
background: #660033 url('images/calendar-top.png') left top no-repeat;
color: #dddddd;
}
The top padding gives just a bit of space to allow the background graphic to show. The bottom padding is arbitrary, I just tweaked it until I liked the way it looks.
Finally we have the CSS for the day box:
.datebox .day {
font-family: Cambria,"Times New Roman",Times,serif;
font-size: 1.4em;
text-align: center;
padding-bottom: 0.1em;
color: #333333;
border-right: 1px solid #660033;
border-bottom: 1px solid #660033;
border-left: 1px solid #660033;
background: #faf8d2 url('images/page-fold-small.png') right bottom no-repeat;
}
The folded paper image is anchored to the bottom right. This box also provides a 1-pixel border that matches the background color of the other elements.
That’s it. If you are a better artist than me, you can probably improve on the look of this calendar. But after trying to zoom the text on several other people’s blogs, I think my CSS version scales pretty nicely.
Here is the actual WordPress PHP code. I added this to index.php and single.php:
<div class="datebox">
<div class="month"><?php the_time('M') ?></div>
<div class="day"><?php the_time('d') ?></div>
</div>
I do think some stone-tablet graphics would go better with my theme.