(core) Keeps side panels closed when opening doc on a narrow screen

Test Plan: Includes nbrowser tests.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D2709
This commit is contained in:
Cyprien P
2021-01-21 10:33:08 +01:00
parent 24d9061007
commit eb90385ee9
2 changed files with 18 additions and 5 deletions

View File

@@ -157,6 +157,10 @@ export const testId: TestId = makeTestId('test-');
// Max width for narrow screen layout (in px). Note: 768px is bootstrap's definition of small screen
export const maxNarrowScreenWidth = 768;
export function isNarrowScreen() {
return window.innerWidth <= 768;
}
export const cssHideForNarrowScreen = styled('div', `
@media (max-width: ${maxNarrowScreenWidth}px) {
& {