Skip to content

Commit

Permalink
chore: Do not hide scrollbars in dev pages in Mac OS (#3168)
Browse files Browse the repository at this point in the history
  • Loading branch information
jperals authored Jan 14, 2025
1 parent d46a1d8 commit f9aeff8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
11 changes: 1 addition & 10 deletions pages/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -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 <Redirect to="/light/" />;
}
Expand Down
9 changes: 0 additions & 9 deletions pages/app/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

/*
Expand Down

0 comments on commit f9aeff8

Please sign in to comment.