|
46 | 46 |
|
47 | 47 | .mantine-datatable-header-resizable-handle { |
48 | 48 | position: absolute; |
49 | | - cursor: 'col-resize'; |
| 49 | + cursor: col-resize; |
50 | 50 | top: 0; |
51 | 51 | bottom: 0; |
52 | | - width: rem(8px); |
53 | | - background: inherit; |
54 | | - cursor: col-resize; |
55 | | - z-index: 1; |
56 | | - transform: translateX(50%); |
| 52 | + right: -6px; /* Extend further to the right */ |
| 53 | + width: 12px; /* Wider for easier clicking */ |
| 54 | + background: transparent; |
| 55 | + z-index: 100; /* Higher z-index to ensure it's above other elements */ |
57 | 56 | opacity: 0; |
58 | 57 | transition: opacity 0.2s; |
| 58 | + |
59 | 59 | &::after { |
60 | 60 | position: absolute; |
61 | 61 | content: ''; |
62 | | - top: rem(1px); |
63 | | - bottom: rem(1px); |
64 | | - left: rem(2px); |
65 | | - border-right: rem(4px) dotted light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4)); |
| 62 | + top: 2px; |
| 63 | + bottom: 2px; |
| 64 | + left: 5px; /* Centered in the wider handle */ |
| 65 | + width: 2px; |
| 66 | + background: light-dark(var(--mantine-color-gray-4), var(--mantine-color-dark-4)); |
| 67 | + border-radius: 1px; |
| 68 | + transition: background-color 0.2s; |
66 | 69 | } |
67 | | - &:hover::after { |
68 | | - border-color: var(--mantine-primary-color-6); |
| 70 | + |
| 71 | + &:hover { |
| 72 | + opacity: 1; |
| 73 | + &::after { |
| 74 | + background: var(--mantine-primary-color-6); |
| 75 | + } |
| 76 | + } |
| 77 | + |
| 78 | + &:active { |
| 79 | + opacity: 1 !important; |
| 80 | + &::after { |
| 81 | + background: var(--mantine-primary-color-7); |
| 82 | + } |
69 | 83 | } |
70 | 84 | } |
71 | 85 |
|
72 | 86 | tr:hover .mantine-datatable-header-resizable-handle { |
73 | 87 | opacity: 1; |
74 | 88 | } |
75 | 89 |
|
| 90 | +/* Ensure resize handle is always visible and accessible for columns with toggleable buttons */ |
| 91 | +.mantine-datatable-header-cell-toggleable.mantine-datatable-header-cell-resizable:hover .mantine-datatable-header-resizable-handle { |
| 92 | + opacity: 1; |
| 93 | +} |
| 94 | + |
| 95 | +/* Enhanced visual feedback during resizing */ |
| 96 | +.mantine-datatable-header-cell-resizable:has(.mantine-datatable-header-resizable-handle:active) { |
| 97 | + background: light-dark(var(--mantine-color-blue-0), var(--mantine-color-dark-7)); |
| 98 | + transition: background 0.1s; |
| 99 | +} |
| 100 | + |
| 101 | +.mantine-datatable-header-cell-resizable:has(.mantine-datatable-header-resizable-handle:active) + th { |
| 102 | + background: light-dark(var(--mantine-color-blue-0), var(--mantine-color-dark-7)); |
| 103 | + transition: background 0.1s; |
| 104 | +} |
| 105 | + |
76 | 106 | .mantine-datatable-header-cell-sortable-group { |
77 | 107 | gap: 0.25em; |
78 | 108 | } |
|
0 commit comments