WeCodePixels / theia-sticky-sidebar

Glues your website's sidebars, making them permanently visible while scrolling.
MIT License
569 stars 209 forks source link

Border-left isn't being accounted for for the sidebars #10

Closed asadkn closed 9 years ago

asadkn commented 9 years ago

Theia sticky bar shifts 1px to the left if the sidebar has a 1px border-left for example. This patch will take into account sidebar's border-left property - just as padding-left is accounted for.

liviucmg commented 9 years ago

Awesome, thanks. :+1: Should we also substract the border-left value from the width? Or 'width': o.sidebar.width() works properly in your case?

asadkn commented 9 years ago

We're fine as jQuery .width() returns the "content" width. And as of jQuery 1.8, if box-sizing: border-box is set, it substracts out the borders to stay consistent in behavior.