Skip to content

Commit

Permalink
Video: add spacing block supports (#43365)
Browse files Browse the repository at this point in the history
* Adding spacing block supports to video block

* This block has customizable padding, border-box makes that more predictable.
  • Loading branch information
ramonjd authored Aug 21, 2022
1 parent ca14481 commit 6a31132
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ Embed a video from your media library or upload a new one. ([Source](https://git

- **Name:** core/video
- **Category:** media
- **Supports:** align, anchor
- **Supports:** align, anchor, spacing (margin, padding)
- **Attributes:** autoplay, caption, controls, id, loop, muted, playsInline, poster, preload, src, tracks

<!-- END TOKEN Autogenerated - DO NOT EDIT -->
4 changes: 4 additions & 0 deletions packages/block-library/src/video/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@
"supports": {
"anchor": true,
"align": true,
"spacing": {
"margin": true,
"padding": true
},
"__experimentalStyle": {
"spacing": {
"margin": "0 0 1em 0"
Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/src/video/style.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.wp-block-video {
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;
video {
width: 100%;
}
Expand Down

0 comments on commit 6a31132

Please sign in to comment.