Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
phcp committed Feb 14, 2025
1 parent 4e35fa9 commit c3a4bd7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion projects/packages/videopress/src/class-initializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ public static function render_videopress_video_block( $block_attributes, $conten
$max_width = isset( $block_attributes['maxWidth'] ) ? $block_attributes['maxWidth'] : null;

if ( $max_width && $max_width !== '100%' ) {
$style = sprintf( 'max-width: %s; margin: auto;', $max_width );
$style = sprintf( 'max-width: %s;', $max_width );
$classes .= ' wp-block-jetpack-videopress--has-max-width';
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,15 @@
opacity: 0;
}
}


&.wp-block-jetpack-videopress--has-max-width {
margin: auto;

:root {
.is-layout-flex & {
margin: 0;
}
}
}
}

0 comments on commit c3a4bd7

Please sign in to comment.