Skip to content

24 ways to impress your friends

Vote down?

Ron Stewart

Having played with this, and encountered a wee bit o’ oddity, I have a question about the “applyPositioning” logic. In the current supersleight implementation, that logic is applied to all A and INPUT elements with their style.position === ‘’ — but shouldn’t the logic that sets their position to ‘relative’ really just be restricted to those A or INPUT elements with a backgroundImage property that is indicative of a PNG (based on the file extension)?

(I ask because I ran into this when I first deployed supersleight, in that it was pushing around the background images on several A elements within my layout that were using GIF images for their background. I solved it by moving that if check up inside the logic that is applied when an element with a background PNG is found.)

Having asked all of that, however, thanks for writing this. Great hack!