All 1 entries tagged Bad Code
No other Warwick Blogs use the tag Bad Code on entries | View entries tagged Bad Code at Technorati | There are no images tagged Bad Code on this blog
February 18, 2008
Part 1 because I’m sure I’ll find more of these.
- You can’t get
element.style.border, but you can set it.
- For a transparent element
element.style.backgroundColor = 'transparent', but
getComputedStyle(element,null).getPropertyValue('background-color') = 'rgba(0,0,0,0)'; i.e. black, but wholly transparent.
In a not-Safari’s-fault tangent, if you want individual channels from an RGB value
split(", ") is BAD CODE.