Skip to content

Commit

Permalink
Fix table data padding overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
oakesjosh committed Dec 4, 2024
1 parent 6ed7dda commit 185e1d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion includes/blocks/class-kadence-blocks-table-data-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function build_css( $attributes, $css, $unique_id, $unique_style_id ) {

$css->set_style_id( 'kb-' . $this->block_name . $unique_style_id );

$css->set_selector( '.kb-table-data' . $unique_id );
$css->set_selector( '.kb-table-container tr td.kb-table-data' . $unique_id . ', .kb-table-container tr th.kb-table-data' . $unique_id );
$css->render_measure_output( $attributes, 'padding', 'padding' );

return $css->css_output();
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/table/children/data/backend-styles/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function BackendStyles(props) {
const { uniqueID, padding, tabletPadding, mobilePadding, paddingType } = attributes;
const css = new KadenceBlocksCSS();

css.set_selector(`th.kb-table-data${uniqueID}, td.kb-table-data${uniqueID}`);
css.set_selector(`tr th.kb-table-data${uniqueID}, tr td.kb-table-data${uniqueID}`);
css.render_measure_output(padding, tabletPadding, mobilePadding, previewDevice, 'padding', paddingType);

const cssOutput = css.css_output();
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/table/children/data/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"padding": {
"type": "array",
"default": ["xxs", "xxs", "xxs", "xxs"]
"default": ["", "", "", ""]
},
"tabletPadding": {
"type": "array",
Expand Down

0 comments on commit 185e1d1

Please sign in to comment.