Skip to content

Commit

Permalink
fix(table-row): update component tokens with fallbacks to table
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonailea committed Jun 18, 2024
1 parent 3a98a0b commit a75d013
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @prop --calcite-table-row-background: [Deprecated] Use `--calcite-table-row-background-color` instead. Specifies the background color of the component.
* @prop --calcite-table-row-background-color: Specifies the background color of the component.
* @prop --calcite-table-row-background-color-striped: The background color of the component's `striped` rows, when specified.
* @prop --calcite-table-row-secondary-background-color: The background color of the component's `striped` rows, when specified.
* @prop --calcite-table-row-background-color-selected: The background color of the component's `selected` rows, when specified.
* @prop --calcite-table-row-border-color: Specifies the border color of the component.
* @prop --calcite-table-row-selected-accent-color: Specifies the border color of the component.
Expand Down Expand Up @@ -39,10 +39,23 @@ calcite-table-cell {
}

tr {
border-block-end: 1px solid var(--calcite-table-row-border-color, transparent);
border-block-end: 1px solid
var(--calcite-table-row-border-color, var(--calcite-internal-table-row-border-color, transparent));
background-color: var(--calcite-table-row-background-color, var(--calcite-color-foreground-1));
}

tr.last-visible-row {
border-block-end: 0;
}

:host(:nth-child(2n + 1)) {
tr {
background-color: var(
--calcite-table-row-secondary-background-color,
var(
--calcite-internal-table-secondary-background-color,
var(--calcite-table-row-background-color, var(--calcite-color-foreground-1))
)
);
}
}

0 comments on commit a75d013

Please sign in to comment.