Patent Office Sees the Light

I’m not sure how I missed this one on MozillaZine last week. Apparently, the U.S. Patent Office has decided that Eolas’ patent on browser plugin technology is invalid. This is a victory for the W3C and open web standards, but it’s almost unfortunate, since IE is the only browser that would have been affected. No plugin support in IE probably would’ve caused more people to move to standards-compliant browsers like [Mozilla Firefox].

Read the whole story at Reuters.

Happy Belated Birthday

I just realized I missed the site’s birthday. As of February 27, 2004, I’ve been posting to this blog fairly regularly for two years.

The site has changed (hopefully evolved rather than devolved) a lot since then. It would be a lot of fun to put up some past layouts screenshots, but that will have to wait for another time.

Happy birthday!

Fresh Look (More on the Way?)

I changed my style sheet a bit and revamped the logo today. These both took me all of half an hour, but they freshen up the site a bit. It’s just weird seeing my own writings in black rather than my trademark green, but I’ll get used to it.

I also installed some plugins (namely SmartyPants and MT-Textile) that change the way curly quotes and other fancy typography is generated, so don’t be surprised if you find screwy typography or layout in some of the older posts. It will probably be some time before I can get to that — in fact it may never happen at all.

I have grand schemes to redo the entire site, but it’ll be a while before I have the time to do it. I want to roll back to a simpler layout. The bloated menus are beginning to bug me. 😀

Transparent Backgrounds

==

*It’s Magic!*

==

I’ve written before about alpha transparency in PNG images. I’ve always wanted to use the effect to give a semi-transparent background to divs on my site. Unfortunately, since IE can’t render PNGs properly, the appearance of the site would break for 90% of all Internet users.

I’ve been designing a new site for the Crimson Nights events that UPC sponsors, and I really wanted “cool factor”. So I went snooping and found this. It’s a blog entry that describes a proprietary technique to load a PNG with full alpha-transparency in IE. It looks like this:

bq.. .tinted {
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader (enabled=true, sizingMethod=scale, src='black75p.png');
}

[Note: everything from “filter” to the semicolon should be on a single line.]

p. Unfortunately, it is only supported by IE. To get other browsers to display the background, you simply use the standard background property, like this:

bq. .tinted {
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader (enabled=true, sizingMethod=scale, src='black75p.png');
background-image: url('black75p.png');
}

Unfortunately, as soon as you apply the standard background property you end up undoing all the hard work it took to convince IE to display the graphic properly. To overcome this difficulty, we need a way of passing something to all browsers except IE. Since IE is not compliant with standards, the solution is not very difficult. We simply add an attribute selector to the tinted class. Since all of our tinted divs will use the class attribute, our new selector will always be applied in browsers that support attribute selectors, thus excluding IE. The final code looks like this:

bq.. .tinted {
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader (enabled=true, sizingMethod=scale, src='black75p.png');
}

.tinted[class] {
background-image: url('black75p.png');
}

p. Since all the other major browsers (Mozilla, Mozilla Firefox, Netscape, and Opera) can read the second selector, they will apply the background image with full alpha-transparency and ignore the silly image filter that IE is dependent upon.

I’m excited to unveil the new site. I think I acheived the “cool factor” I was looking for.

Debugging Woes

This made me laugh: “Beware of strangers“. If you’ve ever debugged a program, you’ll have a good idea what was going through this guy’s head.