pattern-lab/patternlab-php — pull request #204 by FStop (2014-05-27 23:51:10+00:00)
Title: Use offset().top to calculate .sg-acc-panel dynamic height

Currently we're using [viewport height minus header height](https://github.com/pattern-lab/patternlab-php/blob/master/core/styleguide/js/styleguide.js#L49), but on small screens the menu items are stacked underneath the header, resulting in inaccurate height calculations and viewport overflow issues as reported in #145.

If we use the currently active accordion's `offset().top` value instead of header height, the height calculation is much more accurate.

Since `.offset()` returns decimals, I set it to round up to the next pixel.

I tested on my iPhone 4s / iOS 7 / Safari, and it seems to resolve the issue. I hope dev is the right branch to submit PRs against. I'm happy to resubmit if you tell me otherwise or if there find any other issues.