brutaldesign/swipebox — pull request #47 by andrejcremoznik (2013-08-25 00:51:35+00:00)
Title: Cleanups, some fixes and optimizations

So this is quite a lot of changes. It mostly comes down to rewriting left position offsets with transforms for animations. Transforms are hardware accelarated as oposed to position's left/right/top/bottom properties.

Also, `` elements [perform poorly](http://www.youtube.com/watch?v=lcD9CF0bxyk) so I've changed them to render as div's backgrounds. For accessibility's sake `role="img" aria-label=""` gets added to the divs.

I've rewritten most of the CSS: overspecific selectors are gone and there's overall less code.

I tried not to introduce any regressions but there is one change that some might consider a bug and others as a feature. Since images are now set to divs as backgrounds they stretch to fill the div with `background-size: contain;` which means that images smaller than the window get upscaled. I don't consider this a problem but if it is, it'll have to be worked around with some additional JS check.

My JS-fu isn't too great yet so please review my changes. There might be room for improvement.