Skip to content

Commit

Permalink
Update class-kadence-blocks-table-block.php
Browse files Browse the repository at this point in the history
  • Loading branch information
oakesjosh committed Dec 4, 2024
1 parent e27a82c commit 42716f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/blocks/class-kadence-blocks-table-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function build_css( $attributes, $css, $unique_id, $unique_style_id ) {
if( !empty( $attributes['columnBackgrounds'] ) ) {
foreach( $attributes['columnBackgrounds'] as $index => $background ) {
if ( $background ) {
$css->set_selector( '.kb-table-container .kb-table' . esc_attr( $unique_id ) . ' td:nth-of-type(' . ( $index + 1 ) . ')' );
$css->set_selector( '.kb-table-container .kb-table' . esc_attr( $unique_id ) . ' td:nth-of-type(' . ( $index + 1 ) . '), .kb-table-container .kb-table' . esc_attr( $unique_id ) . ' th:nth-of-type(' . ( $index + 1 ) . ')' );
$css->add_property( 'background-color', $css->render_color( $background ) );
}
}
Expand All @@ -187,7 +187,7 @@ public function build_css( $attributes, $css, $unique_id, $unique_style_id ) {
if( !empty( $attributes['columnBackgroundsHover'] ) ) {
foreach( $attributes['columnBackgroundsHover'] as $index => $background ) {
if ( $background ) {
$css->set_selector( '.kb-table-container .kb-table' . esc_attr( $unique_id ) . ' td:nth-of-type(' . ( $index + 1 ) . '):hover' );
$css->set_selector( '.kb-table-container .kb-table' . esc_attr( $unique_id ) . ' td:nth-of-type(' . ( $index + 1 ) . '):hover, .kb-table-container .kb-table' . esc_attr( $unique_id ) . ' th:nth-of-type(' . ( $index + 1 ) . '):hover' );
$css->add_property( 'background-color', $css->render_color( $background ) );
}
}
Expand Down

0 comments on commit 42716f6

Please sign in to comment.