From f05147ecc94436fd1b2125b85ae9a28e2bce6063 Mon Sep 17 00:00:00 2001 From: Paulo Cruz Date: Thu, 16 Jan 2025 14:17:26 -0300 Subject: [PATCH] VideoPress Block: Fix block line-height. (#41102) * Set VideoPress block line-height to zero * changelog * Add missing css to the block view --- .../videopress/changelog/fix-videopress-block-line-height | 4 ++++ .../src/client/block-editor/blocks/video/block.json | 3 ++- .../src/client/block-editor/blocks/video/style.scss | 1 + .../videopress/src/client/block-editor/blocks/video/view.scss | 1 + .../videopress/src/client/block-editor/blocks/video/view.ts | 2 +- 5 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 projects/packages/videopress/changelog/fix-videopress-block-line-height create mode 100644 projects/packages/videopress/src/client/block-editor/blocks/video/view.scss diff --git a/projects/packages/videopress/changelog/fix-videopress-block-line-height b/projects/packages/videopress/changelog/fix-videopress-block-line-height new file mode 100644 index 0000000000000..f59352da73d79 --- /dev/null +++ b/projects/packages/videopress/changelog/fix-videopress-block-line-height @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fix VideoPress block line-height. diff --git a/projects/packages/videopress/src/client/block-editor/blocks/video/block.json b/projects/packages/videopress/src/client/block-editor/blocks/video/block.json index fe4ce76f41ebb..7a195402ba30a 100644 --- a/projects/packages/videopress/src/client/block-editor/blocks/video/block.json +++ b/projects/packages/videopress/src/client/block-editor/blocks/video/block.json @@ -129,5 +129,6 @@ "editorScript": "file:./index.js", "editorStyle": "file:./index.css", "style": "file:./style.css", - "viewScript": "file:./view.js" + "viewScript": "file:./view.js", + "viewStyle": "file:./view.css" } diff --git a/projects/packages/videopress/src/client/block-editor/blocks/video/style.scss b/projects/packages/videopress/src/client/block-editor/blocks/video/style.scss index 587c6e7908410..817e00019483e 100644 --- a/projects/packages/videopress/src/client/block-editor/blocks/video/style.scss +++ b/projects/packages/videopress/src/client/block-editor/blocks/video/style.scss @@ -12,6 +12,7 @@ .jetpack-videopress-player__wrapper { position: relative; display: flex; + line-height: 0; } .jetpack-videopress-player__overlay { diff --git a/projects/packages/videopress/src/client/block-editor/blocks/video/view.scss b/projects/packages/videopress/src/client/block-editor/blocks/video/view.scss new file mode 100644 index 0000000000000..974f2dcaf300f --- /dev/null +++ b/projects/packages/videopress/src/client/block-editor/blocks/video/view.scss @@ -0,0 +1 @@ +@import './style.scss'; diff --git a/projects/packages/videopress/src/client/block-editor/blocks/video/view.ts b/projects/packages/videopress/src/client/block-editor/blocks/video/view.ts index d2cdfd09d9517..fdda730871099 100644 --- a/projects/packages/videopress/src/client/block-editor/blocks/video/view.ts +++ b/projects/packages/videopress/src/client/block-editor/blocks/video/view.ts @@ -6,7 +6,7 @@ import domReady from '@wordpress/dom-ready'; /** * Internal dependencies */ -import './style.scss'; +import './view.scss'; /** * Preview on Hover effect for VideoPress videos.