Skip to content

Commit 68d39cc

Browse files
committed
fix: use 0 for 0px
1 parent d380ecd commit 68d39cc

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

package/DataTable.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@
3737
linear-gradient(to right, rgba(0, 0, 0, light-dark(0.05, 0.25)), rgba(0, 0, 0, 0)),
3838
linear-gradient(to right, rgba(0, 0, 0, light-dark(0.05, 0.25)), rgba(0, 0, 0, 0) 30%);
3939

40-
--mantine-datatable-header-height: 0px;
41-
--mantine-datatable-footer-height: 0px;
42-
--mantine-datatable-selection-column-width: 0px;
40+
--mantine-datatable-header-height: 0;
41+
--mantine-datatable-footer-height: 0;
42+
--mantine-datatable-selection-column-width: 0;
4343
--mantine-datatable-top-shadow-opacity: 0;
4444
--mantine-datatable-left-shadow-opacity: 0;
4545
--mantine-datatable-bottom-shadow-opacity: 0;
4646
--mantine-datatable-right-shadow-opacity: 0;
4747
--mantine-datatable-footer-position: sticky;
48-
--mantine-datatable-footer-bottom: 0px;
48+
--mantine-datatable-footer-bottom: 0;
4949
--mantine-datatable-last-row-border-bottom: unset;
5050

5151
position: relative;

package/DataTableEmptyState.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
color: light-dark(var(--mantine-color-gray-6), var(--mantine-color-dark-3));
1010
opacity: 0;
1111
transition: opacity 0.2s;
12-
padding-top: var(--mantine-datatable-header-height, 0px);
13-
padding-bottom: var(--mantine-datatable-footer-height, 0px);
12+
padding-top: var(--mantine-datatable-header-height, 0);
13+
padding-bottom: var(--mantine-datatable-footer-height, 0);
1414

1515
&[data-active] {
1616
opacity: 1;

package/DataTableLoader.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
background: alpha(var(--mantine-datatable-background-color), 0.75);
1010
opacity: 0;
1111
transition: opacity 0.2s;
12-
padding-top: var(--mantine-datatable-header-height, 0px);
13-
padding-bottom: var(--mantine-datatable-footer-height, 0px);
12+
padding-top: var(--mantine-datatable-header-height, 0);
13+
padding-bottom: var(--mantine-datatable-footer-height, 0);
1414
}
1515

1616
.mantine-datatable-loader-fetching {

package/hooks/useDataTableInjectCssVariables.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export function useDataTableInjectCssVariables({
8484
(rect) => {
8585
setCssVar(root.current, VAR_HEADER_HEIGHT, `${rect.height}px`);
8686
},
87-
() => setCssVar(root.current, VAR_HEADER_HEIGHT, '0px')
87+
() => setCssVar(root.current, VAR_HEADER_HEIGHT, '0')
8888
);
8989
}, [header.current]);
9090

@@ -94,7 +94,7 @@ export function useDataTableInjectCssVariables({
9494
(rect) => {
9595
setCssVar(root.current, VAR_FOOTER_HEIGHT, `${rect.height}px`);
9696
},
97-
() => setCssVar(root.current, VAR_FOOTER_HEIGHT, '0px')
97+
() => setCssVar(root.current, VAR_FOOTER_HEIGHT, '0')
9898
);
9999
}, [footer.current]);
100100

@@ -104,7 +104,7 @@ export function useDataTableInjectCssVariables({
104104
(rect) => {
105105
setCssVar(root.current, VAR_SELECTION_COLUMN_WIDTH, `${rect.width}px`);
106106
},
107-
() => setCssVar(root.current, VAR_SELECTION_COLUMN_WIDTH, '0px')
107+
() => setCssVar(root.current, VAR_SELECTION_COLUMN_WIDTH, '0')
108108
);
109109
}, [selectionColumnHeader.current]);
110110

@@ -132,7 +132,7 @@ export function useDataTableInjectCssVariables({
132132
const diff = tableRect.height - scrollRect.height;
133133
const relative = diff < 0;
134134
setCssVar(root.current, '--mantine-datatable-footer-position', relative ? 'relative' : 'sticky');
135-
setCssVar(root.current, '--mantine-datatable-footer-bottom', relative ? `${diff}px` : '0px');
135+
setCssVar(root.current, '--mantine-datatable-footer-bottom', relative ? `${diff}px` : '0');
136136
}
137137

138138
function processLastRowBottomBorder() {

0 commit comments

Comments
 (0)