-
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
Revert img, iframe styles to block editor container scope #18287
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems wise enough. If @jasmussen can still have a look that'd be ace, but here's my approval.
I notice the stylesheet for WordPress 5.2.4 doesn't include any styles for the barebone |
This one does remove the figcaption rule, from what I can tell. I'm personally fine with that, and the context for the rule is here: #14407 (comment) — choice quote:
But like I said it's likely fine to do this. But it does seem to be beyond the scope of this PR initially, to just remove the img and iframe styles. I'm fine with either, and on this one will defer to those of you skilled in picking cherries. 👍 👍 Thanks so much for this, Andrew! |
I certainly don't mean to undo the efforts involved in #14407, and I'm especially conscious there was quite a bit of prior discussion. Essentially, I can agree with the stated goal of having some "modicum of styles to blocks", even to those blocks which don't opt-in. My issue is that these styles aren't scoped to blocks, they apply to every element on the page. Looking through a theme repository search, I could see how the previous style might inadvertently impact a number of themes (e.g. Customizr's author info, Covernews' posts grid widget, etc). As I understand it, removing the style as proposed here should at least not regress on existing blocks until we can decide how to avoid those conflicts. |
I still think this is something to strive for, but ideally we’d be able to do this in a way that only affects blocks, no? |
Yes that seems sensible. I'm 👍👍 on this for the technical considerations. |
I observed after my last changes that #14407 was largely about moving caption styles to apply to the theme opt-in stylesheet. Thus, in order to not regress in applying margins (which are expected to apply to this subset of blocks without opt-in), it was necessary to reintroduce those styles explicitly to the Effectively reinstates:
|
* Revert img, iframe styles to block editor container scope * Block Library: Remove all vanilla styles * Block Library: Restore non-theme front-end margins for figcaption
* Revert img, iframe styles to block editor container scope * Block Library: Remove all vanilla styles * Block Library: Restore non-theme front-end margins for figcaption
The list of included fixes is: WordPress/gutenberg#18183 WordPress/gutenberg#18194 WordPress/gutenberg#18230 WordPress/gutenberg#18275 WordPress/gutenberg#18287 Updated packages: - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] Props @aduth, @mcsf, @youknowriad, @johnbillion. Fixes #48502. git-svn-id: https://develop.svn.wordpress.org/trunk@46656 602fd350-edb4-49c9-b593-d223f7449a82
The list of included fixes is: WordPress/gutenberg#18183 WordPress/gutenberg#18194 WordPress/gutenberg#18230 WordPress/gutenberg#18275 WordPress/gutenberg#18287 Updated packages: - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] Props @aduth, @mcsf, @youknowriad, @johnbillion. Fixes #48502. git-svn-id: https://develop.svn.wordpress.org/trunk@46656 602fd350-edb4-49c9-b593-d223f7449a82
The list of included fixes is: WordPress/gutenberg#18183 WordPress/gutenberg#18194 WordPress/gutenberg#18230 WordPress/gutenberg#18275 WordPress/gutenberg#18287 Updated packages: - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] Props @aduth, @mcsf, @youknowriad, @johnbillion. Fixes #48502. Built from https://develop.svn.wordpress.org/trunk@46656 git-svn-id: http://core.svn.wordpress.org/trunk@46456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The list of included fixes is: WordPress/gutenberg#18183 WordPress/gutenberg#18194 WordPress/gutenberg#18230 WordPress/gutenberg#18275 WordPress/gutenberg#18287 Updated packages: - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] Props @aduth, @mcsf, @youknowriad, @johnbillion. Fixes #48502. Built from https://develop.svn.wordpress.org/trunk@46656 git-svn-id: https://core.svn.wordpress.org/trunk@46456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The list of included fixes is: WordPress/gutenberg#18183 WordPress/gutenberg#18194 WordPress/gutenberg#18230 WordPress/gutenberg#18275 WordPress/gutenberg#18287 Updated packages: - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] Props @aduth, @mcsf, @youknowriad, @johnbillion. Fixes #48502. Built from https://develop.svn.wordpress.org/trunk@46656
The list of included fixes is: WordPress/gutenberg#18183 WordPress/gutenberg#18194 WordPress/gutenberg#18230 WordPress/gutenberg#18275 WordPress/gutenberg#18287 Updated packages: - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] - @wordpress/[email protected] Props @aduth, @mcsf, @youknowriad, @johnbillion. Fixes #48502. git-svn-id: http://develop.svn.wordpress.org/trunk@46656 602fd350-edb4-49c9-b593-d223f7449a82
Previously: #14407
Alternative to: #18240, #18281
This pull request seeks to revert styling applied globally to
img
andiframe
(Update: andfigcaption
) to that which existed prior to #14407. Prior to #14407, these styles were scoped to only apply within the editor. As of #14407, they apply to these elements globally (including on the front-end), thus introducing some conflict.There is discussion on an ideal solution to this scenario in #18240. However, for the purposes of a release in time for 5.3, the proposed changes here limit the scope to reverting a previously-known state.
Specific change being reverted: https://github.com/WordPress/gutenberg/pull/14407/files#diff-556b1933de5650dc555c469c584accc2L91