Skip to content

Commit 6fb69a3

Browse files
committed
refactor: make grid scroller inherit border radius in base styles
1 parent 706beca commit 6fb69a3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

packages/grid/src/styles/vaadin-grid-base-styles.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,15 @@ export const gridStyles = css`
1616
align-self: stretch;
1717
position: relative;
1818
box-sizing: border-box;
19+
overflow: hidden;
1920
-webkit-tap-highlight-color: transparent;
2021
background: var(--vaadin-grid-background, var(--vaadin-background-color));
21-
border: var(--_border-width) solid var(--_border-color);
22+
border: var(--vaadin-grid-border-width, 1px) solid var(--_border-color);
2223
cursor: default;
2324
--_border-color: var(--vaadin-grid-border-color, var(--vaadin-border-color-secondary));
24-
--_border-width: 0;
2525
--_row-border-width: var(--vaadin-grid-row-border-width, 1px);
2626
--_column-border-width: var(--vaadin-grid-column-border-width, 0px);
27-
border-radius: var(--_border-radius);
28-
--_border-radius: 0;
27+
border-radius: var(--vaadin-grid-border-radius, var(--vaadin-radius-m));
2928
}
3029
3130
:host([hidden]),
@@ -39,21 +38,22 @@ export const gridStyles = css`
3938
}
4039
4140
/* Variant: No outer border */
42-
:host(:not([theme~='no-border'])) {
43-
--_border-width: var(--vaadin-grid-border-width, 1px);
44-
--_border-radius: var(--vaadin-grid-border-radius, var(--vaadin-radius-m));
41+
:host([theme~='no-border']) {
42+
border-width: 0;
43+
border-radius: 0;
4544
}
4645
4746
:host([all-rows-visible]) {
4847
height: auto;
4948
align-self: flex-start;
5049
min-height: auto;
5150
flex-grow: 0;
51+
overflow: visible;
5252
}
5353
5454
#scroller {
5555
contain: layout;
56-
border-radius: calc(var(--_border-radius) - var(--_border-width));
56+
border-radius: inherit;
5757
position: relative;
5858
display: flex;
5959
width: 100%;
@@ -571,7 +571,7 @@ export const gridStyles = css`
571571
/* Drag'n'drop styles */
572572
:host([dragover]) {
573573
outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
574-
outline-offset: calc(var(--_border-width) * -1);
574+
outline-offset: calc(var(--vaadin-grid-border-width, 1px) * -1);
575575
}
576576
577577
[part~='row'][dragover] {

0 commit comments

Comments
 (0)