Skip to content

Commit

Permalink
Remove --rdg-sign variable and use dir pseudo-class (#3561)
Browse files Browse the repository at this point in the history
* Remove `--rdg-sign` variable and use `dir` pseudo-class

Co-authored-by: Nicolas Stepien <[email protected]>
  • Loading branch information
amanmahajan7 and nstepien authored Jul 30, 2024
1 parent 48c1fbc commit 9675973
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/DataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,6 @@ function DataGrid<R, SR, K extends Key>(
gridTemplateRows: templateRows,
'--rdg-header-row-height': `${headerRowHeight}px`,
'--rdg-scroll-height': `${scrollHeight}px`,
'--rdg-sign': isRtl ? -1 : 1,
...layoutCssVars
} as unknown as React.CSSProperties
}
Expand Down
6 changes: 5 additions & 1 deletion src/style/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ const root = css`
${lightTheme}
--rdg-selection-color: #66afe9;
--rdg-font-size: 14px;
--rdg-cell-frozen-box-shadow: calc(2px * var(--rdg-sign)) 0 5px -2px rgba(136, 136, 136, 0.3);
--rdg-cell-frozen-box-shadow: 2px 0 5px -2px rgba(136, 136, 136, 0.3);
&:dir(rtl) {
--rdg-cell-frozen-box-shadow: -2px 0 5px -2px rgba(136, 136, 136, 0.3);
}
display: grid;
Expand Down

0 comments on commit 9675973

Please sign in to comment.