my love for acronyms

October 21, 2002, 03:01 pm

Last Friday, Jesse, JB, and I were talking about acronyms, and I mentioned my love for acronyms began when I was in maybe the first or second grade and I was the only kid in class that knew that SCUBA stood for: Self-Contained-Underwater-Breathing-Apparatus (I think I knew this because of an episode of Family Ties in which Alex helps Mallory study for some test in school and after hours and hours of studying and quizzing, she gets her first question correct: What does the acronym, SCUBA, stand for?). And I think my teacher thought I was brilliant or something; I definitely felt really cool for knowing it, so I began my lifelong commitment to memorizing acronyms (particularly TLAs).

I found this very detailed CSS tutorial. I was particularly interested in the section about row selectors.

It says that you can write CSS rules for table:row-even and table:row-odd (as well as the ability to select the nth row or whatever). This just isn't true. Not only did it not work when I tested it out with Phoenix, but I looked at the official CSS2 recommendation, particularly the section about selectors and it's just not there.

I'll admit, I'm a little pissed:  oh, how I wish it worked. The way I currently implement alternating row colors annoys me. I shouldn't have to change my markup for something so trivial.

However, I did learn some fancy new CSS tricks. In the audio video club website, Jesse added // in front of pretty much every <h2> tag, changing the actual markup. I found out that you can do the same thing with CSS2, using :before & :after pseudo-elements. For example, to achieve the same result with CSS:

h2:before { content: "//"; }

What's even more fancy is that you can use the CSS2 function attr() to generate content based on a particular tag's attributes. For example, I've added the following rules in my print stylesheet, allowing me to “resolve” the <acronym> and <abbr> tags as well as show href attributes for <a> tags:

acronym:before, abbr:before { content: attr(title) " ("; } acronym:after, abbr:after { content: ")"; } a:after { content: " [" attr(href) "]"; }

The only drawback to using the :before and :after pseudo-elements is that they are not supported in IE (I tested on IE6 at work... they are supported in all gecko-based browsers (Mozilla, Chimera, Phoenix) as well as Opera (on Windows at least).

I like double-vee words like “savvy” and “privvy”.