Skip to content
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

Broad selector for figure elements in WP 6.1 #45768

Open
gbaggaley opened this issue Nov 15, 2022 · 1 comment
Open

Broad selector for figure elements in WP 6.1 #45768

gbaggaley opened this issue Nov 15, 2022 · 1 comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Type] Enhancement A suggestion for improvement.

Comments

@gbaggaley
Copy link

Description

Also posted to trac for reference:
https://core.trac.wordpress.org/ticket/57103

I've just updated a bunch of our websites to 6.1 and seen that there's an incredibly broad css selector for all figure elements introduced into ./wp-includes/css/dist/block-library/style.min.css:

figure {
    margin: 0 0 1em
}

This has broken the styling on multiple themes we've developed for clients.
The same issue also happened a few months ago for img elements (https://core.trac.wordpress.org/ticket/55229 and #39021).

Is there anything that can be done to prevent this happening again?

Step-by-step reproduction instructions

  1. Update WordPress to 6.1
  2. Activate any theme that uses a figure element
  3. figure element already has a margin applied to it from ./wp-includes/css/dist/block-library/style.min.css

Screenshots, screen recording, code snippet

N/A

Environment info

  • WordPress 6.1

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@mrfoxtalbot mrfoxtalbot added the CSS Styling Related to editor and front end styles, CSS-specific issues. label Nov 22, 2022
@addedlovely
Copy link

+1 This is a very loose selector, also causing us multiple bug reports across multiple client sites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants