mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(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:
@@ -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) {
|
||||
& {
|
||||
|
||||
Reference in New Issue
Block a user