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

Elements block support: Fix link color rendering on site front end #35446

Merged
merged 1 commit into from
Oct 8, 2021

Conversation

andrewserong
Copy link
Contributor

@andrewserong andrewserong commented Oct 8, 2021

Description

Fixes an issue introduced in #35425 where the elements' block support styles render an additional style tag within a style tag, which caused a regression for rendering styles on the front end of a site.

The similar block supports that render styles using wp_footer wrap the styles in a <style> tag, however in this function the styles are already wrapped, so we don't need to add the additional wrapper.

How has this been tested?

Manually with TT1-Blocks theme active.

Add a post and insert a paragraph block. Choose a preset custom color for the link color, and view the post on the front end of the site.

With this PR applied, the color should render correctly.

Screenshots

Front end of the site:

Before After
image image

View source:

Before After
image image

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@andrewserong andrewserong added [Type] Bug An existing feature does not function as intended [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. labels Oct 8, 2021
@andrewserong andrewserong self-assigned this Oct 8, 2021
Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍 I see the <style> tag on line 41.

@andrewserong
Copy link
Contributor Author

Thanks for the quick review @Mamaduka!

@andrewserong andrewserong merged commit f1bfe76 into trunk Oct 8, 2021
@andrewserong andrewserong deleted the fix/link-color-styles-footer-rendering branch October 8, 2021 06:19
@github-actions github-actions bot added this to the Gutenberg 11.8 milestone Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants