From 3c30d293fa1d52ff51581091e3d39a30ac7474d3 Mon Sep 17 00:00:00 2001 From: nacho Date: Tue, 23 Apr 2019 15:13:11 -0600 Subject: CSS: adjust media query breakpoint to improve tablet readability see https://github.com/nextcloud/news/pull/467 --- core/src/init.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'core/src') diff --git a/core/src/init.js b/core/src/init.js index ebf99ffd640..b6cdf319739 100644 --- a/core/src/init.js +++ b/core/src/init.js @@ -30,6 +30,9 @@ import {setUp as setUpMainMenu} from './components/MainMenu' import {setUp as setUpUserMenu} from './components/UserMenu' import PasswordConfirmation from './OC/password-confirmation' +// keep in sync with core/css/variables.scss +const breakpoint_mobile_width = 1024; + const resizeMenu = () => { const appList = $('#appmenu li') const rightHeaderWidth = $('.header-right').outerWidth() @@ -37,7 +40,7 @@ const resizeMenu = () => { const usePercentualAppMenuLimit = 0.33 const minAppsDesktop = 8 let availableWidth = headerWidth - $('#nextcloud').outerWidth() - (rightHeaderWidth > 210 ? rightHeaderWidth : 210) - const isMobile = $(window).width() < 768 + const isMobile = $(window).width() < breakpoint_mobile_width if (!isMobile) { availableWidth = availableWidth * usePercentualAppMenuLimit } @@ -279,7 +282,7 @@ export const initCore = () => { } const toggleSnapperOnSize = () => { - if ($(window).width() > 768) { + if ($(window).width() > breakpoint_mobile_width) { snapper.close() snapper.disable() -- cgit v1.2.3