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: Add styles to the footer before the block is rendered #37728

Merged
merged 12 commits into from
Apr 13, 2022
3 changes: 2 additions & 1 deletion lib/block-supports/elements.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ function gutenberg_render_elements_support_footer( $pre_render, $block ) {
$style = ".$class_name a{" . $link_color_declaration . ';}';

gutenberg_enqueue_block_support_styles( $style );
return $style;

return null;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did that for the sake of the test...

Copy link
Member

Choose a reason for hiding this comment

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

I removed the test I suggested we should have. As you said, in this case, the value would lie in a e2e test. It'd be great to have it :)

}

// Remove WordPress core filter to avoid rendering duplicate elements stylesheet.
Expand Down