filamentgroup / criticalCSS

Finds the Above the Fold CSS for your page, and outputs it into a file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use getBoundingClientRect rather than offsetTop

scottjehl opened this issue · comments

Selectors matching absolutely positioned elements that are well below the fold can sometimes be included in critical css because offsetTop returns the distance to their relative parent, rather than the top of the viewport or page. getBoundingClientRect would avoid this problem.