-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add scope to iframe 100% width css style #18050
Comments
Second to this. Currently the stylesheet is outputting even when gutenberg is disabled and it is breaking live sites that are on WP 5.3. |
Follow up here as some folks may end up searching for a solution. In my case the styles shouldn't even be loaded because GB is not enabled on the sites this was breaking, so I just added |
This works really nicely:
It is basically the reverse of https://github.com/WordPress/WordPress/blob/master/wp-includes/script-loader.php#L2831 |
+1 Seeing this mess up ads that don't have explicit width/height attributes specified in the iFrame code. Disabling the Gutenberg plugin and relying on core functionality for now, but it would be great if this was fixed. |
Actually, looks like it may be fixed 🎉 #18287 |
Gutenberg global styles insist that an iframe should be 100% wide.
This overrides any iframe width or height attributes, I guess to be able to render videos and such responsively, but leads to trouble where the width and height attributes should not be overridden (in our case: ads).
Expected behavior
The
width: 100%
iframe style should be scoped to the block that needs it, in stead of being global.The text was updated successfully, but these errors were encountered: