Skip to content

Commit

Permalink
fix: make resize handle not overlap with column sorter
Browse files Browse the repository at this point in the history
Decrease the resize handle area to use `--lumo-size-s` to avoid any
overlapping with the column sorter when the column width is reduced.
Also uses the resize handle width to calculate the amount of translation
in the X axis to make it better center aligned.

Fixes #5637
  • Loading branch information
DiegoCardoso committed Aug 29, 2024
1 parent 1a9fc33 commit 7476b1d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/grid/theme/lumo/vaadin-grid-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,18 @@ registerStyles(
/* Column resizing */
[part='resize-handle'] {
width: 3px;
--_resize-handle-width: 3px;
width: var(--_resize-handle-width);
background-color: var(--lumo-primary-color-50pct);
opacity: 0;
transition: opacity 0.2s;
}
[part='resize-handle']::before {
transform: translateX(calc(-50% + var(--_resize-handle-width)));
width: var(--lumo-size-s);
}
:host(:not([reordering])) *:not([column-resizing]) [part~='cell']:hover [part='resize-handle'],
[part='resize-handle']:active {
opacity: 1;
Expand Down

0 comments on commit 7476b1d

Please sign in to comment.