From f9aeff86a555776e50b7e55eb40e5b59fe708ead Mon Sep 17 00:00:00 2001 From: Joan Perals Date: Tue, 14 Jan 2025 15:18:53 +0100 Subject: [PATCH] chore: Do not hide scrollbars in dev pages in Mac OS (#3168) --- pages/app/index.tsx | 11 +---------- pages/app/styles.scss | 9 --------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/pages/app/index.tsx b/pages/app/index.tsx index 2c68648caf..13c7ea5a81 100644 --- a/pages/app/index.tsx +++ b/pages/app/index.tsx @@ -16,7 +16,7 @@ import StrictModeWrapper from './components/strict-mode-wrapper'; // import font-size reset and Ember font import '@cloudscape-design/global-styles/index.css'; // screenshot test overrides -import styles from './styles.scss'; +import './styles.scss'; interface GlobalFlags { appLayoutWidget?: boolean; @@ -57,7 +57,6 @@ function App() { // Also, AppLayout pages should resemble the ConsoleNav 2.0 styles const isAppLayout = isAppLayoutPage(pageId); const ContentTag = isAppLayout ? 'div' : 'main'; - const isMacOS = navigator.userAgent.toLowerCase().indexOf('macintosh') > -1; useEffect(() => { applyMode(mode ?? null); @@ -71,14 +70,6 @@ function App() { disableMotion(motionDisabled); }, [motionDisabled]); - useEffect(() => { - if (isMacOS) { - document.body.classList.add(styles.macos); - } else { - document.body.classList.remove(styles.macos); - } - }, [isMacOS]); - if (!mode) { return ; } diff --git a/pages/app/styles.scss b/pages/app/styles.scss index 9b670a2d6c..ad5c19d45b 100644 --- a/pages/app/styles.scss +++ b/pages/app/styles.scss @@ -20,15 +20,6 @@ body { caret-color: transparent !important; } // stylelint-enable @cloudscape-design/no-implicit-descendant, selector-max-type - - &.macos { - // override scrollbars in macos for stable screenshot tests - // stylelint-disable-next-line @cloudscape-design/no-implicit-descendant - ::-webkit-scrollbar { - inline-size: 0; - block-size: 0; - } - } } /*