Skip to content

Commit

Permalink
clarify why we need this CSS property
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jun 13, 2021
1 parent d90fd70 commit d2b4c45
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion docs/pages/branding/mui-x.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,8 @@ const communityData = [
const Slider = styled('div')(({ theme }) => ({
scrollSnapType: 'x mandatory',
display: 'flex',
WebkitOverflowScrolling: 'touch', // Add iOS momentum scrolling.
// Add iOS momentum scrolling for iOS < 13.0
WebkitOverflowScrolling: 'touch',
overflowX: 'scroll',
margin: '0 -15px',
'& > div': {
Expand Down
3 changes: 2 additions & 1 deletion packages/material-ui/src/DialogContent/DialogContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ const DialogContentRoot = styled('div', {
},
})(({ theme, styleProps }) => ({
flex: '1 1 auto',
WebkitOverflowScrolling: 'touch', // Add iOS momentum scrolling.
// Add iOS momentum scrolling for iOS < 13.0
WebkitOverflowScrolling: 'touch',
overflowY: 'auto',
padding: '20px 24px',
...(styleProps.dividers
Expand Down
3 changes: 2 additions & 1 deletion packages/material-ui/src/Drawer/Drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ const DrawerPaper = styled(Paper, {
height: '100%',
flex: '1 0 auto',
zIndex: theme.zIndex.drawer,
WebkitOverflowScrolling: 'touch', // Add iOS momentum scrolling.
// Add iOS momentum scrolling for iOS < 13.0
WebkitOverflowScrolling: 'touch',
// temporary style
position: 'fixed',
top: 0,
Expand Down
3 changes: 2 additions & 1 deletion packages/material-ui/src/ImageList/ImageList.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ const ImageListRoot = styled('ul', {
overflowY: 'auto',
listStyle: 'none',
padding: 0,
WebkitOverflowScrolling: 'touch', // Add iOS momentum scrolling.
// Add iOS momentum scrolling for iOS < 13.0
WebkitOverflowScrolling: 'touch',
/* Styles applied to the root element if `variant="masonry"`. */
...(styleProps.variant === 'masonry' && {
display: 'block',
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/Menu/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const MenuPaper = styled(Paper, {
// height. This ensures a tapable area outside of the simple menu with which to dismiss
// the menu.
maxHeight: 'calc(100% - 96px)',
// Add iOS momentum scrolling.
// Add iOS momentum scrolling for iOS < 13.0
WebkitOverflowScrolling: 'touch',
});

Expand Down
3 changes: 2 additions & 1 deletion packages/material-ui/src/Tabs/Tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ const TabsRoot = styled('div', {
})(({ styleProps, theme }) => ({
overflow: 'hidden',
minHeight: 48,
WebkitOverflowScrolling: 'touch', // Add iOS momentum scrolling.
// Add iOS momentum scrolling for iOS < 13.0
WebkitOverflowScrolling: 'touch',
display: 'flex',
...(styleProps.vertical && {
flexDirection: 'column',
Expand Down

0 comments on commit d2b4c45

Please sign in to comment.