Skip to content

Commit

Permalink
fix: Fix table styling for striped variation (#4889)
Browse files Browse the repository at this point in the history
  • Loading branch information
ioanabrooks authored Jan 6, 2024
1 parent 936243f commit 067e2b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/loud-dolphins-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@aws-amplify/ui': patch
---

Fix table styling for striped variation
16 changes: 8 additions & 8 deletions packages/ui/src/theme/css/component/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@
var(--amplify-components-table-header-border-width);
}

&--striped {
.amplify-table__row:not(.amplify-table__head *):nth-child(odd) {
background-color: var(
--amplify-components-table-row-striped-background-color
);
}
}

&__caption {
caption-side: var(--amplify-components-table-caption-caption-side);
color: var(--amplify-components-table-caption-color);
Expand Down Expand Up @@ -149,14 +157,6 @@
/**
* Data attribute stylings
*/
&[data-variation='striped'] {
.amplify-table__row:not(.amplify-table__head *):nth-child(odd) {
background-color: var(
--amplify-components-table-row-striped-background-color
);
}
}

&[data-highlightonhover='true'] {
.amplify-table__row:not(.amplify-table__head *):hover {
background-color: var(
Expand Down

0 comments on commit 067e2b1

Please sign in to comment.