Skip to content

Commit

Permalink
fix(table): add styles for sticky table group header
Browse files Browse the repository at this point in the history
  • Loading branch information
joneff committed Jan 5, 2022
1 parent edb6234 commit da9199f
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 18 deletions.
6 changes: 3 additions & 3 deletions packages/bootstrap/scss/table/_variables.scss
Expand Up @@ -58,13 +58,13 @@ $table-footer-border: $grid-footer-border !default;

/// Background color of group rows in table.
/// @group table
$table-group-row-bg: $grid-grouping-row-bg !default;
$table-group-row-bg: $table-header-bg !default;
/// Text color of group rows in table.
/// @group table
$table-group-row-text: $grid-grouping-row-text !default;
$table-group-row-text: $table-header-text !default;
/// Border color of group rows in table.
/// @group table
$table-group-row-border: null !default;
$table-group-row-border: $table-header-border !default;


/// Background color of alternating rows in table.
Expand Down
6 changes: 3 additions & 3 deletions packages/classic/scss/table/_variables.scss
Expand Up @@ -58,13 +58,13 @@ $table-footer-border: $grid-footer-border !default;

/// Background color of group rows in table.
/// @group table
$table-group-row-bg: $grid-grouping-row-bg !default;
$table-group-row-bg: $table-header-bg !default;
/// Text color of group rows in table.
/// @group table
$table-group-row-text: $grid-grouping-row-text !default;
$table-group-row-text: $table-header-text !default;
/// Border color of group rows in table.
/// @group table
$table-group-row-border: null !default;
$table-group-row-border: $table-header-border !default;


/// Background color of alternating rows in table.
Expand Down
19 changes: 15 additions & 4 deletions packages/default/scss/table/_layout.scss
@@ -1,4 +1,4 @@
@include exports("table/layout") {
@include exports( "table/layout" ) {

// Table
.k-table {
Expand Down Expand Up @@ -30,12 +30,11 @@
// Table native parts
.k-table-thead,
.k-table-tbody,
.k-table-tfoot {
text-align: inherit;
}
.k-table-tfoot,
.k-table-row,
.k-table-alt-row {
border-color: inherit;
text-align: inherit;
}
.k-table-th,
.k-table-td {
Expand Down Expand Up @@ -86,6 +85,18 @@
margin-bottom: -1px;
}
}
.k-table-group-sticky-header {
font-size: $table-font-size;
line-height: $line-height;
flex: none;

.k-table-th {
display: flex;
flex-flow: row nowrap;
align-items: center;
align-content: center;
}
}


// Table list
Expand Down
5 changes: 3 additions & 2 deletions packages/default/scss/table/_theme.scss
@@ -1,4 +1,4 @@
@include exports("table/theme") {
@include exports( "table/theme" ) {

// Table
.k-table,
Expand All @@ -11,7 +11,8 @@

// Table header
.k-table-thead,
.k-table-header {
.k-table-header,
.k-table-group-sticky-header {
border-color: $table-header-border;
color: $table-header-text;
background-color: $table-header-bg;
Expand Down
6 changes: 3 additions & 3 deletions packages/default/scss/table/_variables.scss
Expand Up @@ -58,13 +58,13 @@ $table-footer-border: $grid-footer-border !default;

/// Background color of group rows in table.
/// @group table
$table-group-row-bg: $grid-grouping-row-bg !default;
$table-group-row-bg: $table-header-bg !default;
/// Text color of group rows in table.
/// @group table
$table-group-row-text: $grid-grouping-row-text !default;
$table-group-row-text: $table-header-text !default;
/// Border color of group rows in table.
/// @group table
$table-group-row-border: null !default;
$table-group-row-border: $table-header-border !default;


/// Background color of alternating rows in table.
Expand Down
6 changes: 3 additions & 3 deletions packages/material/scss/table/_variables.scss
Expand Up @@ -58,13 +58,13 @@ $table-footer-border: $grid-footer-border !default;

/// Background color of group rows in table.
/// @group table
$table-group-row-bg: $grid-grouping-row-bg !default;
$table-group-row-bg: $table-header-bg !default;
/// Text color of group rows in table.
/// @group table
$table-group-row-text: $grid-grouping-row-text !default;
$table-group-row-text: $table-header-text !default;
/// Border color of group rows in table.
/// @group table
$table-group-row-border: null !default;
$table-group-row-border: $table-header-border !default;


/// Background color of alternating rows in table.
Expand Down

0 comments on commit da9199f

Please sign in to comment.