Be careful when using comma-separated CSS selectors: IE will ignore the whole rule if it doesn’t understand one of the selectors

July 19th, 2006

Today I was wracking my brain, trying to figure out why Internet Explorer wasn’t respecting some of the rules in my CSS file. It finally occurred to me that perhaps it was getting tripped up by the attribute selectors I had grouped into the same rule. IE, of course, doesn’t understand attribute selectors. But I thought it would safely ignore these and apply the properties to the other selectors in the group. Here is what I had:

input[type="text"],
input[type="password"],
input[type="file"],
textarea,
select,
.reply,
.viewQuestion #yourAnswer {
    border-color: #ccc;
}

IE was ignoring the gray border I wanted for these elements. It seems stupid to me that it would throw out the whole rule instead of merely ignoring the selectors it didn’t understand and applying the rule to those it did. But it turns out this behavior exactly follows what is in the CSS 2 spec!

To fix my problem, I split my rule into two - one with the attribute selectors, and one without. Not terribly elegant, but the spec doesn’t really leave much choice.

New laptop

July 16th, 2006

Dell E1505On Friday I ordered a laptop from Dell. I’ve been wanting one for a while, and thanks to a great deal that my friend Rob found, I finally bought one. I am definitely looking forward to using my computer while sitting comfortably on the couch.

It’s a Dell Inspiron E1505 Intel Dual Core Processor with 15.4″ UltraSharp widescreen display, 1GB RAM, 60GB hard drive, and CD/DVD burner, all for $878.

Can’t wait to get it!

Anti-social weekend

July 9th, 2006

Do you ever get in one of those moods where you just don’t feel like putting any effort into communicating with people? Like just the thought of having to make a phone call or email to someone is exhausting? Except family, that is, because it doesn’t take any effort to communicate with them. Maybe I’m just weird. Did get a nice bike ride in this weekend, though. The weather Saturday was lovely.

Knit bag

June 21st, 2006

My first knitting project that I’ve completed in a while is the Saturday Market Bag by Jodie Danenberg (a fellow string player!)

It took me three tries to finally get the pattern right - I wasn’t looking closely enough, and was passing the yarn over stitch over, instead of the slipped stich. Once I got the hang of it, it was quite easy. Didn’t take me long at all to do (just took me forever before posting about it!) I used a cotton/acrylic blend yarn.

It alarmed me slightly how much the bag stretches, but it’s just a bag, not a sweater, so I guess I don’t really have to worry about pulling it out of shape. It’ll just conform to the shape of whatever’s inside. However, I underestimated how much the handle would stretch, and made it too long. Oh well, just knot the top and it’s whatever length I want.

jQuery makes Javascript fun

June 21st, 2006

…or at least it claims to, and after reading up on it on the jQuery website, I’m thinking they might be on to something.

I’ve pretty much spent the whole day today at work staring at Javascript code, reading about different Javascript libraries, and trying to see if there’s anything out there that will make my life easier. It doesn’t help when the documentation for these libraries is so minimal. Prototype doesn’t have any documentation on their official site that I can see! I had to use Google to find other site’s tutorials and reference information.

At any rate, the jQuery syntax and functions seem very nice and succinct and easy. I haven’t actually tried to use it yet, but I’m looking forward to it tomorrow.

Also found a tab implementation that should prove very useful for what I’m working on right now (with a little modification to match my somewhat different HTML - I need a few more elements to hang my fancy backgrounds on).

Pet peeve of the day: “weary” vs. “wary”

June 12th, 2006
weary
  1. Physically or mentally fatigued.
  2. Expressive of or prompted by fatigue: a weary smile.
  3. Having one’s interest, forbearance, or indulgence worn out: weary of delays.
  4. Causing fatigue; tiresome: a weary wait.
wary
  1. On guard; watchful: taught to be wary of strangers.
  2. Characterized by caution: a wary glance at the black clouds.

Why do so many people get these two words confused when they’re writing? They’re not even pronounced the same!