There is a responsive.js file. May be there is the right place to sharing all this duplicated calculations.