@@ -22,7 +22,7 @@ export const gridStyles = css`
2222 cursor : default;
2323 - - _bor der- color : var(- - vaadin- grid- bor der- color , var (- - vaadin- bor der- color - secondary));
2424 - - _bor der- width: 0;
25- - - _row- bor der- width: var(- - vaadin- grid- row- bor der- width, 5px );
25+ - - _row- bor der- width: var(- - vaadin- grid- row- bor der- width, 1px );
2626 - - _column- bor der- width: var(- - vaadin- grid- column- bor der- width, 0px);
2727 bor der- radius: var(- - _bor der- radius);
2828 - - _bor der- radius: 0;
@@ -96,6 +96,7 @@ export const gridStyles = css`
9696 left : 0 ;
9797 width : 100% ;
9898 z-index : 2 ;
99+ will-change : transform;
99100 }
100101
101102 : host ([dir = 'rtl' ]) # items ,
@@ -133,6 +134,12 @@ export const gridStyles = css`
133134 border-block : var (--_row-border-width ) solid var (--_border-color );
134135 }
135136
137+ # header : not (: empty ): not (: has (tr : not ([hidden ]))) {
138+ margin-block-start : calc (var (--_row-border-width ) * -1 );
139+ padding-block-start : var (--_row-border-width );
140+ pointer-events : none;
141+ }
142+
136143 # header [part ~= 'row' ] {
137144 border-block-start-style : none;
138145
@@ -155,6 +162,7 @@ export const gridStyles = css`
155162 & : first-child {
156163 border-block-start-style : none;
157164
165+ /* Footer top border */
158166 & ::before {
159167 content : '' ;
160168 display : none;
@@ -185,11 +193,6 @@ export const gridStyles = css`
185193
186194 /* Grid without header */
187195 # table : not (: has (# header > tr : not ([hidden ]))) {
188- # header {
189- margin-block-start : calc (var (--_row-border-width ) * -1 );
190- padding-block-start : var (--_row-border-width );
191- }
192-
193196 [part ~= 'first-row' ],
194197 [part ~= 'first-row' ] [part ~= 'cell' ] {
195198 /* Focus outline */
@@ -199,8 +202,7 @@ export const gridStyles = css`
199202 }
200203 }
201204
202- /* Grid without footer and is at the end */
203- : host ([overflow ~= 'top' ]): not (: has (# footer > tr : not ([hidden ]))) {
205+ : host ([overflow ~= 'top' ]) # table : not (: has (# footer > tr : not ([hidden ]))) {
204206 [part ~= 'last-row' ] {
205207 border-block-end-style : none;
206208 }
@@ -221,22 +223,24 @@ export const gridStyles = css`
221223 }
222224 }
223225
226+ /* Footer top border */
224227 # footer [part ~= 'row' ]::before {
225228 display : block;
226229 }
227230 }
228231
229232 # scroller [empty-state ] {
230233 # table : has (# header > tr : not ([hidden ])) {
231- & # emptystatebody {
234+ # emptystatebody {
232235 margin-top : calc (var (--_row-border-width ) * -1 );
233236 }
234237
235- & # emptystatecell {
238+ # emptystatecell {
236239 border-block : var (--_row-border-width ) solid transparent;
237240 }
238241 }
239242
243+ /* Footer top border */
240244 # footer [part ~= 'row' ]::before {
241245 display : block;
242246 }
@@ -263,78 +267,22 @@ export const gridStyles = css`
263267 position : relative;
264268 align-items : center;
265269 white-space : nowrap;
266- border-inline-start : var (--_column-border-width ) solid var (--_border-color );
270+ border-inline : var (--_column-border-width ) var (--_border-color );
271+ border-inline-start-style : solid;
267272 }
268273
269274 [part ~= 'first-column-cell' ] {
270- border-inline-start : 0 ;
271- }
272-
273- /* [part~='first-header-row-cell'],
274- [part~='first-footer-row-cell'],
275- [part~='first-row-cell'] {
276- margin-top: 0;
277- border-top: 0;
278- } */
279-
280- /* table:has(#header > tr:not([hidden])) [part~='first-row-cell'] {
281- border-top: var(--_row-border-width) solid var(--_border-color);
282- } */
283-
284- /* [part~='last-column-cell'] {
285- --_end: 1;
286- }
287-
288- [part~='last-column-cell']:is([part~='header-cell'], [part~='footer-cell']) {
289- --_end-opaque: 1;
290- }
291-
292- [part~='last-row-cell']:where(:not([part~='details-opened-row-cell'])),
293- [part~='last-footer-row-cell'] {
294- border-bottom: 0;
295- --_bottom: 1;
275+ border-inline-start-style : none;
296276 }
297277
298278 [part ~= 'last-frozen-cell' ] {
299- --_end: 1;
300- }
301-
302- [part~='last-frozen-cell'] + [part~='cell'] {
303- border-inline-start-color: transparent;
304- }
305-
306- [part~='first-frozen-to-end-cell'] {
307- border-inline-start: 0;
308- --_start: 1;
309- }
279+ border-inline-end-style : solid;
310280
311- [part~='last-header-row-cell'] {
312- border-bottom: 0;
313- }
314-
315- :host([overflow~='top']) [part~='last-header-row-cell'],
316- [empty-state] [part~='last-header-row-cell'] {
317- --_bottom: 1;
318- }
319-
320- #header:has(:is([frozen], [frozen-to-end])) [part~='last-header-row-cell'] {
321- --_bottom-opaque: 1;
322- }
323-
324- :host([overflow~='bottom']) [part~='first-footer-row-cell'],
325- [empty-state] [part~='first-footer-row-cell'] {
326- --_top: 1;
327- }
328-
329- #footer:has(:is([frozen], [frozen-to-end])) [part~='first-footer-row-cell'] {
330- --_top-opaque: 1;
281+ & + [part ~= 'cell' ] {
282+ border-inline-start-style : none;
283+ }
331284 }
332285
333- table:has(#footer > tr:not([hidden])) [part~='last-row-cell']:not([part~='details-opened-row-cell']) {
334- border-bottom: var(--_row-border-width) solid var(--_border-color);
335- --_bottom: 0;
336- } */
337-
338286 [part ~= 'body-cell' ]: where (: not ([part ~= 'details-cell' ])) {
339287 --_highlight-background-color : var (--vaadin-grid-row-highlight-background-color , transparent);
340288 --_highlight-background-image : linear-gradient (
@@ -587,40 +535,6 @@ export const gridStyles = css`
587535 outline-offset : calc (var (--vaadin-focus-ring-width ) * -1 );
588536 }
589537
590- /* [part~='first-column-cell']::after {
591- inset-inline-start: 0;
592- }
593-
594- [part~='last-column-cell']::after {
595- inset-inline-end: 0;
596- } */
597-
598- /* #header [part~='row'] {
599-
600- } */
601-
602- /* #header [part~='row']:first-child::after,
603- [part~='first-header-row-cell']::after,
604- [part*='first-row']::after {
605- top: 0;
606- }
607-
608- table:has(#header > tr:not([hidden])) [part~='first-row-cell']::after {
609- top: calc(var(--_row-border-width) * -1);
610- } */
611-
612- /* #footer [part~='row']:last-child::after,
613- [part~='last-footer-row-cell']::after,
614- [part~='last-row']::after,
615- [part~='last-row-cell']::after {
616- bottom: 0;
617- } */
618-
619- /* #header [part~='row']:last-child::after,
620- table:has(#footer > tr:not([hidden])) [part*='last-row']::after {
621- bottom: calc(var(--_row-border-width) * -1);
622- } */
623-
624538 : host ([navigating ]) [part ~= 'row' ]: focus,
625539 : host ([navigating ]) [part ~= 'cell' ]: focus {
626540 outline : 0 ;
0 commit comments