Skip to content

Commit

Permalink
fix: padding for old users using cover layout
Browse files Browse the repository at this point in the history
  • Loading branch information
abaicus committed Jan 29, 2025
1 parent 3974900 commit 2dc5d8c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions inc/core/styles/frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,23 @@ public function setup_blog_card_style() {
'is_responsive' => true,
'directional-prop' => 'padding',
'suffix' => 'responsive_unit',
'filter' => function ( $css_prop, $value, $meta, $device ) {
$output = '';
$unit = Css_Prop::get_unit_responsive( $meta, $device );

$check = array_filter(
$value,
function ( $item ) {
return ! empty( $item ) || $item === '0';
}
);

if ( empty( $check ) ) {
return '';
}

return sprintf( $css_prop . ':%1$s%5$s %2$s%5$s %3$s%5$s %4$s%5$s;', $value['top'], $value['right'], $value['bottom'], $value['left'], $unit );
},
],
];

Expand Down

0 comments on commit 2dc5d8c

Please sign in to comment.