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

Core Cover Block Classes change after updating the block #50751

Open
ryanAllMad opened this issue May 18, 2023 · 5 comments
Open

Core Cover Block Classes change after updating the block #50751

ryanAllMad opened this issue May 18, 2023 · 5 comments
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Block] Cover Affects the Cover Block - used to display content laid over a background image CSS Styling Related to editor and front end styles, CSS-specific issues. [Type] Bug An existing feature does not function as intended

Comments

@ryanAllMad
Copy link

Description

The core cover block classes change when updating the block. I notice this is only an issue with the WordPress Test Data: Block Cover post. The .wp-block-cover-text class is removed and the p tag is wrapped in .wp-block-cover__inner-container. This makes it hard to use the test data to create styles for the cover block.

Step-by-step reproduction instructions

  1. To recreate, install the WordPress core data.
  2. Go to the Block Cover post page on the front end and search for .wp-block-cover-text
  3. Edit the post and alter any setting on any one of the cover blocks
  4. View the post on the front end and search for .wp-block-cover-text again and you'll notice it's not there.

Screenshots, screen recording, code snippet

Before updating the cover block:
Screenshot 2023-05-18 at 11 12 19 AM

After updating the cover block:
Screenshot 2023-05-18 at 11 12 30 AM

Environment info

Version | 6.2.1
Google Chrome Version 113.0.5672.126
Mac Ventura 13.3.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

@carolinan
Copy link
Contributor

carolinan commented May 19, 2023

Hi!
The test data includes the latest markup of the cover block in the post called "WP 6.1 Media category blocks".
Make sure you download the current version.

I recommend using the stylebook feature in the site editor to test your styles, though it only has one copy of the cover block, not all settings.

@carolinan
Copy link
Contributor

carolinan commented May 19, 2023

There are 516 themes in the theme directory that uses the class .wp-block-cover-text but it may just be for backward compatibility. Since the theme developers hasn't added comments to their CSS it is hard to tell for sure, of course. This includes some default themes.

@Mamaduka Mamaduka added Needs Testing Needs further testing to be confirmed. [Block] Cover Affects the Cover Block - used to display content laid over a background image labels May 19, 2023
@ryanAllMad
Copy link
Author

Thanks for getting back to me! I can see the case for making the styles backwards compatible by providing styles for both classes.

@carolinan
Copy link
Contributor

I was not able to pinpoint exactly when it was removed or if there was a discussion about keeping the class name for the default inner block.

@github-actions
Copy link

Hi,
This issue has gone 30 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps.
Thanks for helping out.

@github-actions github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Jun 19, 2023
@jordesign jordesign added [Type] Bug An existing feature does not function as intended Backwards Compatibility Issues or PRs that impact backwards compatability CSS Styling Related to editor and front end styles, CSS-specific issues. and removed [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. Needs Testing Needs further testing to be confirmed. labels Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Block] Cover Affects the Cover Block - used to display content laid over a background image CSS Styling Related to editor and front end styles, CSS-specific issues. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants