Skip to content

Commit

Permalink
Fix mobile horizontal scroll (#7254)
Browse files Browse the repository at this point in the history
Don't show in changelog
  • Loading branch information
AlexandreSi authored Dec 20, 2024
1 parent 6577432 commit 85f6e74
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,18 @@ import AuthenticatedUserContext from '../../../Profile/AuthenticatedUserContext'
import { SECTION_DESKTOP_SPACING } from './SectionContainer';

const iconSize = 20;
const iconButtonPaddingTop = 8;
const iconButtonPadding = 8;
/**
* Padding bottom is bigger than padding top to leave space for the Android/iOS
* bottom navigation bar.
*/
const iconButtonPaddingBottom = 20;
const iconButtonPaddingHorizontal = 8;
const iconButtonMarginBottom = 12;
const iconButtonLabelPadding = 4;
const toolbarHeight =
iconSize +
2 * iconButtonLabelPadding +
iconButtonPaddingTop +
iconButtonPaddingBottom;
2 * iconButtonPadding +
iconButtonMarginBottom;
export const homepageDesktopMenuBarWidth = 230;
export const homepageMediumMenuBarWidth =
verticalTabButtonSize + 2 * marginsSize;
Expand Down Expand Up @@ -62,7 +61,8 @@ export const styles = {
marginBottom: 'env(safe-area-inset-bottom)',
},
mobileButton: {
padding: `${iconButtonPaddingTop}px ${iconButtonPaddingHorizontal}px ${iconButtonPaddingBottom}px ${iconButtonPaddingHorizontal}px`,
padding: iconButtonPadding,
marginBottom: iconButtonMarginBottom,
fontSize: 'inherit',
},
buttonLabel: { padding: iconButtonLabelPadding, display: 'flex' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const styles = {
},
container: {
flex: 1,
overflowX: 'hidden',
},
scrollContainer: {
overflowY: 'scroll', // Force a scrollbar to prevent layout shifts.
Expand Down

0 comments on commit 85f6e74

Please sign in to comment.