Skip to content

Commit 3c07d99

Browse files
fix(data-table): respect the current layer theming (#20873)
Co-authored-by: Heloise Lui <71858203+heloiselui@users.noreply.github.com>
1 parent 9a1475a commit 3c07d99

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

packages/web-components/src/components/data-table/_table-core.scss

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717

1818
display: table-header-group;
1919

20-
background-color: $layer-accent-01;
20+
background-color: $layer-accent;
2121
}
2222

2323
::slotted(#{$prefix}-table-body) {
2424
@include type-style('body-short-01');
2525

2626
display: table-row-group;
2727

28-
background-color: $layer-01;
28+
background-color: $layer;
2929
inline-size: 100%;
3030
}
3131
}
@@ -159,7 +159,7 @@
159159
::slotted(#{$prefix}-table-header-cell),
160160
::slotted(#{$prefix}-table-header-cell-skeleton) {
161161
display: table-cell;
162-
background-color: $layer-accent-01;
162+
background-color: $layer-accent;
163163
color: $text-primary;
164164
outline: none;
165165
text-align: start;
@@ -401,7 +401,7 @@
401401
.#{$prefix}--table-column-checkbox,
402402
::slotted(#{$prefix}-table-cell),
403403
::slotted(#{$prefix}-table-cell-skeleton) {
404-
border-block-end: 1px solid $layer-01;
404+
border-block-end: 1px solid $layer;
405405
}
406406
}
407407

@@ -410,8 +410,8 @@
410410
.#{$prefix}--table-column-checkbox,
411411
::slotted(#{$prefix}-table-cell),
412412
::slotted(#{$prefix}-table-cell-skeleton) {
413-
background-color: $layer-accent-01;
414-
border-block-end: 1px solid $layer-accent-01;
413+
background-color: $layer-accent;
414+
border-block-end: 1px solid $layer-accent;
415415
}
416416
}
417417

@@ -423,8 +423,8 @@
423423
.#{$prefix}--table-expand,
424424
.#{$prefix}--table-column-checkbox {
425425
background-color: $background-hover;
426-
border-block-end-color: $layer-hover-01;
427-
border-block-start-color: $layer-hover-01;
426+
border-block-end-color: $layer-hover;
427+
border-block-start-color: $layer-hover;
428428
color: $text-primary;
429429
}
430430
}
@@ -437,7 +437,7 @@
437437
::slotted(#{$prefix}-table-cell),
438438
::slotted(#{$prefix}-table-cell-skeleton) {
439439
background-color: $background-hover;
440-
border-block-end: 1px solid $layer-hover-01;
440+
border-block-end: 1px solid $layer-hover;
441441
}
442442
}
443443

packages/web-components/src/components/data-table/_table-expandable.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,30 +135,30 @@
135135
&[highlighted] {
136136
.#{$prefix}--table-expand {
137137
background-color: $background-hover;
138-
border-block-end-color: $layer-hover-01;
139-
border-block-start-color: $layer-hover-01;
138+
border-block-end-color: $layer-hover;
139+
border-block-start-color: $layer-hover;
140140
}
141141
}
142142

143143
&[even] {
144144
.#{$prefix}--table-expand {
145-
background-color: $layer-accent-01;
146-
border-block-end: 1px solid $layer-accent-01;
145+
background-color: $layer-accent;
146+
border-block-end: 1px solid $layer-accent;
147147

148148
&:hover {
149149
background-color: $background-hover;
150-
border-block-end: 1px solid $layer-hover-01;
150+
border-block-end: 1px solid $layer-hover;
151151
}
152152
}
153153
}
154154

155155
&[odd] {
156156
.#{$prefix}--table-expand {
157-
border-block-end: 1px solid $layer-01;
157+
border-block-end: 1px solid $layer;
158158

159159
&:hover {
160160
background-color: $background-hover;
161-
border-block-end: 1px solid $layer-hover-01;
161+
border-block-end: 1px solid $layer-hover;
162162
}
163163
}
164164
}

packages/web-components/src/components/data-table/_table-selection.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@
5151
:host(#{$prefix}-table-row:hover) {
5252
.#{$prefix}--table-column-checkbox {
5353
background-color: $background-hover;
54-
border-block-end-color: $layer-hover-01;
55-
border-block-start-color: $layer-hover-01;
54+
border-block-end-color: $layer-hover;
55+
border-block-start-color: $layer-hover;
5656
}
5757
}
5858

5959
:host(#{$prefix}-table-row[selected]) {
6060
::slotted(#{$prefix}-table-cell),
6161
.#{$prefix}--table-expand,
6262
.#{$prefix}--table-column-checkbox {
63-
background-color: $layer-accent-01;
63+
background-color: $layer-accent;
6464
// bottom border acts as separator from other rows
6565
border-block-end: 1px solid $layer-active;
6666
color: $text-primary;

0 commit comments

Comments
 (0)