-
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
Styles: Paragraph styling impacts Site Title & Site Tagline #46863
Comments
The cause of this looks to be targeting the styles on the |
Probably targeting only the paragraph block p on the entry content could be a solution. |
I've been checking this one a bit more in-depth, and the paragraph block is not using class name, which makes it more complicated to target styles only for the content produced by this block. We could potentially start using class names for the paragraph block and target the styles only for this type of block. The tradeoff with this fix will be that there's no backward compatibility and it'll work only for content produced after the fix. A different option could be adding more targeted css for this but it could lead into a rabbit hole. |
Regarding block-specific classes, the same is true for lists. Recently headings were the same, but now headings receive block classes. While adding classes to every paragraph block is not ideal, I am not sure of another way to fix this without complex and potentially fragile CSS. |
Good context @ndiego, thanks. I assumed adding the classname would cause a bunch of invalidations, but looks like the heading blocks classnames were added server side which avoided the issue. Adding the classname seems like the most obvious option. |
Sounds good. I can open a PR with the changes to add the CSS class to paragraphs in the coming days. |
Hi, hope all are doing well. Let me know if I can pick this issue up and raise a PR for the same. I see the PR - #47282, quite old, may need rework for the same or may have conflicts. Thanks. |
This is fixed for the issue WordPress#46863, when any change to global style is added it gets effected to all the elements which have <p> tag, instead of only paragraph. So other blocks like site title was getting changed too.
Not enough progress has been made for 6.5. Punting this as a result! |
Hi folks, |
Hello 👋 |
Description
When changing Styles for the Paragraph block, the site title and site tagline are also impacted, despite being separate blocks, in Gutenberg 14.8.4.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
styles.changes.mov
Environment info
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
The text was updated successfully, but these errors were encountered: