Skip to content

Conversation

@zpericic
Copy link

@zpericic zpericic commented Jul 2, 2023

Closes #52276
Regression after #50310

What?

Load all elements global styles for non 'core/' blocks.

Why?

Any style with $metadata['path'] will be skipped if does not have element starting with 'core/'. We should use 'wp_add_inline_style' for all global styles.

How?

Call 'wp_add_inline_style' for all block global styles.

Testing Instructions

  1. Install custom block (name in block.json not starting with "core/") with support any global style defined in styles.blocks.some/block.elements (eg. button, link, h[1-6]) of theme.json
  2. Change some value for button, link, h[1-6] in styles.blocks.some/block.elements
  3. See change are effective

@zpericic zpericic requested a review from spacedmonkey as a code owner July 2, 2023 23:17
@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Jul 2, 2023
@github-actions
Copy link

github-actions bot commented Jul 2, 2023

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @zpericic! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@zpericic
Copy link
Author

This is resolved in Wordpress by 4174 and merged in Trac 56254.

Error still persist if guttenberg is active.

@zpericic zpericic closed this Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Block specific elements styles are not applied for non-core block plugins

2 participants