wagtail/bakerydemo

Problem with iframe dimensions in paragraph blocks in Streamfields.

Closed this issue · 0 comments

gzark1 commented

Description:

The dimensions of iframes within the .block-paragraph_block containers are excessively small, leading to suboptimal visibility and user experience.

I discovered that the current CSS selector for .block-embed_block iframe is not adequately capturing iframes within paragraph blocks. Consequently, the iframe dimensions remain unchanged, resulting in the undesirably small display.

Steps to Reproduce:

Navigate to the following page: http://localhost:8000/blog/desserts-benefits/
Scroll down to the section where there is a YouTube video embedded within a paragraph.
Observe that the YouTube video appears to be smaller than expected within the paragraph container.

Expected Behavior:

The YouTube video embedded within the paragraph block should have appropriate dimensions and aspect ratio, ensuring optimal visibility and readability.

Actual Behavior:

The .block-embed_block iframe CSS rule, which sets the aspect ratio to 16:9 and adjusts the width and height to 100%, does not cover the case when an iframe is inside a paragraph block. As a result, the YouTube video within the paragraph block appears smaller than intended.

Proposed Solution:

I will open a pull request to implement the suggested CSS selector adjustment. The pull request will contain the necessary changes to accommodate iframes within paragraph blocks.

Additionally, I welcome any suggestions or alternative approaches from the reviewers to tackle this issue effectively.

Screenshots

image

image