Skip to content

Commit

Permalink
refactor(data-table): 🚚 Move cell styles into its own private file
Browse files Browse the repository at this point in the history
  • Loading branch information
maicol07 committed Apr 19, 2023
1 parent f507435 commit e7a00df
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
23 changes: 23 additions & 0 deletions data-table/lib/_data-table-cell.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@use "@material/data-table/data-table";

@mixin styles() {
@include data-table.core-styles;
@include data-table.theme-baseline;
:host {
@extend .mdc-data-table__cell;

display: table-cell;
vertical-align: inherit;
color: var(--_row-item-label-text-color);
border-bottom: var(--_row-item-outline-width) solid var(--_row-item-outline-color);
}

:host([type="numeric"]) {
@extend .mdc-data-table__cell--numeric;
}

:host([type="checkbox"]) {
@extend .mdc-data-table__cell--checkbox;
padding: 0 6px;
}
}
19 changes: 2 additions & 17 deletions data-table/lib/data-table-cell.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
@use "@material/data-table/data-table";
@use "./_data-table-cell";

@include data-table.core-styles;
@include data-table.theme-baseline;
@include data-table-cell.styles();

:host {
@extend .mdc-data-table__cell;

display: table-cell;
vertical-align: inherit;
color: var(--_row-item-label-text-color);
border-bottom: var(--_row-item-outline-width) solid var(--_row-item-outline-color);
}

:host([type="numeric"]) {
@extend .mdc-data-table__cell--numeric;
}

:host([type="checkbox"]) {
@extend .mdc-data-table__cell--checkbox;
padding: 0 6px;
}

0 comments on commit e7a00df

Please sign in to comment.