pinafore/routes/_utils/getMainTopMargin.js
Nolan Lawson b7f5d04b4c
fix(scrolling): use body as scrolling container (#656)
* fix(scrolling): use body as scrolling container

Fixes #526

* fixup tests and focus
2018-11-17 18:06:49 -08:00

11 lines
260 B
JavaScript

// should be kept in sync with global.scss
export function getMainTopMargin () {
if (window.matchMedia('(max-width: 767px)').matches) {
return 62
} else if (window.matchMedia('(max-width: 991px').matches) {
return 52
} else {
return 42
}
}