-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Post Title: link color not applied in the view #52195
Comments
Hi @jffng, Thanks for the report. I believe this issue is related to #50906. As far as I can tell, this problem occurs in all blocks that have a parent block. For example, if a link color is applied to a block within a group block, the link color is not applied on the front end: EditorFrontendThe link text color is applied by using the gutenberg_get_elements_class_name() function to generate an md5 hash value based on the serialized value of the block array and using a class name such as First, the CSS selector is generated by the pre_render_block hook. Then the render_block_data hook adds a new Subsequently, the render_block hook adds the class name to the block to be rendered. However, since the block array contains a new This problem would also occur if the developer used hooks related to the rendering of blocks and altered the array of blocks, so a radical approach might be necessary. |
So it's just that we are adding extra |
I'm looking into this. Any extra key breaks it, so I'm looking for an alternative solution. |
I filled a PR with a fix. |
@luisherranz Thanks for submitting the PR. I have confirmed that this issue has been fixed in the latest trunk 🎉 |
Thanks to you, @t-hamano. Your triage was super helpful to fix the issue. |
Description
Attempting to change the post title's link color does not work.
Step-by-step reproduction instructions
Add some markup like this to a template:
Verify the link color is correct in the editor, but not the front end.
Screenshots, screen recording, code snippet
Using emptytheme:
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: