December 1, 2009 – 4:05 pm
Consider the following:
ul li {
display: inline;
margin-right: 10px;
padding-right: 10px;
border-right: 1px solid red;
}
ul li:last-child {
margin-right: 0;
padding-right: 0;
border-right: 0;
}
This bit of CSS would give you perfect line separators in IE8+. But since IE 7 supports the :first-child pseudo-class, we can do one better:
ul li {
display: inline;
margin-left: 10px;
padding-left: 10px;
[...]
December 1, 2009 – 3:50 pm
For those using either Greasemonkey or GreaseKit, I threw together a quick script to add the Ping.fm interface in your Twitter homepage:
Ping.fm / Twitter Integrator
Here’s a screenshot of what that looks like for reference:
December 1, 2009 – 3:31 pm
With 24 Ways pushing RGBa into the foreground today, I thought I’d share a quick debugging tip. Using RGBa can help while you’re debugging element positioning. For the adventurous, combine with a debug class:
.debug {
background: rgba(255, 0, 0, 0.5);
}
And just like that, a new update. Several small fixes worthy of a point upgrade:
Switched QuerySelector engine to Sizzle 1.0
querySelector/querySelectorAll can now be run on any element (via Selectors API)
IE 8 does not like setAttribute on type elements. Reverting to DOM 1 method.
Fixed minor assertion bug in Require.js
A tiny update that fixes IE 8 browser identification. It previously incorrectly identified IE 8 as IE 5.
It had a good run there for a few months. I don’t need to tell you about MLB’s At Bat app do I? It’s the better (and free) alternative, and I can’t really compete with baseball’s integrated setup.
My thanks to the founders, wherever you are. That was a great weekend.
Update: An anonymous genius in the comments suggested using translateY instead of top for the animation. After some edits I’ve updated my demo, and it flies! The scrolling animation is smooth as silk. Apparently Webkit transforms are the only hardware-accelerated animations at this point. Thanks, random dude on the internet!
Update 2: This code is released [...]
An email going around the client-side mailing list at Schematic casually mentioned forEach loops. The sender liked them, but tended to avoid them because there was no way to break out of one.
Naturally, this sent me on the hunt to see if it was at all possible. A furious Google search led me to a [...]