Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions packages/x-data-grid/src/components/containers/GridRootStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,23 @@ export const GridRootStyles = styled('div', {
minHeight: 0,
flexDirection: 'column',
overflow: 'hidden',
overflowAnchor: 'none', // Keep the same scrolling position
transform: 'translate(0, 0)', // Create a stacking context to keep scrollbars from showing on top

[`.${c.main} > *:first-child${ignoreSsrWarning}`]: {
borderTopLeftRadius: 'var(--unstable_DataGrid-radius)',
borderTopRightRadius: 'var(--unstable_DataGrid-radius)',
},
[`& .${c.virtualScroller}`]: {
overflowAnchor: 'none', // Keep the same scrolling position
},

// Use `css` tagged template so the ignore-comment remains a sibling of the
Comment thread
arminmeh marked this conversation as resolved.
Outdated
// `:first-child` rule in the stylis AST. Previously, the comment was embedded
// in the object-key selector, which got separated from the rule during
// pre-serialization when `styleOverrides` were applied, re-triggering Emotion's
// unsafe-selector SSR warning. https://github.com/emotion-js/emotion/issues/1105
[`.${c.main}`]: css`
& > *:first-child ${ignoreSsrWarning} {
border-top-left-radius: var(--unstable_DataGrid-radius);
border-top-right-radius: var(--unstable_DataGrid-radius);
}
`,
Comment thread
arminmeh marked this conversation as resolved.
Outdated
[`&.${c.autoHeight}`]: {
height: 'auto',
},
Expand Down