« Older Home
Loading Newer »
Archive for November, 2007
30
Nov
Links.  | 
30
Nov
Learned.  | 

Today I learned that even though Photoshop has phased out ImageReady, I don’t have to use “Adobe Fireworks” to make my animated GIFs: this functionality is now under the Animation window in Photoshop.

Not that I encourage making animated GIFs if you can avoid it.

29
Nov

I finally managed to pin down a tricky IE7 CSS bug today, regarding a bizarrely specific behavior.

The client reported a graphical glitch on the Resources page of the said site. The instructions were “Go to the Resource page, use the drop-down nav Resources to navigate to a subpage, then browse ‘back’ and use the drop-down nav again.” The result was that the previously-clicked LI now displayed the background image of the top navbar it descended from.

I don’t want to bore you with excessive detail, or me with screenshots or an example, but this all led to an interesting discovery: Ace stylesheeter Rob had been using a four-tier sprite setup for the menu in question, the fourth tier being the oft-neglected “active” pseudoclass. This meant that on top of the standard “non-hover, hover, selected” tiers, an “active” tier was adding graphical feedback for clicking directly on a link. I highly approve of this practice.

When you browse “back” in modern browsers, the page you reach has set the last link you clicked to the “active” state (you see this in Firefox when you return to a page and see the little dotted border around the item). In this case, the child link clicked had no active style set, but the parent LI did. This somehow led to the child inheriting the full active style from the parent, even though the parent hadn’t been clicked on as a link.

But if the active state was overriding the background of the child element, why wasn’t it visible on the first click? It actually WAS, but a more specific hover state was overruling it. I found that if I clicked quickly and moused-off, I could catch a glimpse of the glitch before navigating to the next page.

I have no real conclusions here, but it seems in a case like this, IE7 has a different interpretation of what becomes “active” after a click. While Firefox and IE6 rightly assumed that the item I wanted to active was the item I interacted with, IE7 applied the same class to a parent element, as well.

I wonder how far up the tree it goes, if this is the case? Can we put active states on the body tag that cause changes after a link anywhere is clicked, or is the bubbling limited to immediate parents? I’ll have to test this a little more this weekend.

28
Nov
Learned.  | 

Second Kings, Chapter Two:

“From there Elisha went up to Bethel. As he was walking along the road, some youths came out of the town and jeered at him. “Go on up, you baldhead!” they said. “Go on up, you baldhead!” He turned around, looked at them and called down a curse on them in the name of the LORD. Then two bears came out of the woods and mauled forty-two of the youths.”


This funny
(but crude and potentially not work-safe) article from the recently-good Cracked Magazine calls out the 9 baddest-ass Bible verses ever. Several I remembered (the sword in the stomach was an old, terrifying favorite), but a couple surprised me. BoingBoing is right, we need to get this book back into schools ASAP.

Also, when using strftime() to format a date in Rails, you can shorten month and day names simply by using lowercases like %b and %a instead of %B and %A.

I didn’t say this would be a useful post, just something I learned.

27
Nov

Facebook has a number of clever controls to keep developers from overriding standard behaviors and accessing private information. One of these is their Javascript solution, FBJS.

It seems to have a pretty robust (as far as I know), chainable set of DOM selectors that allow it to function pretty similarly to jQuery (which I’m still learning about).

(Of course, having yet to crack my DOM Scripting book, I could be entirely wrong about how much more/less complex FBJS is than plain ol’ JS. MORE STUFF TO LEARN LATER).