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

Global styles element styles doesn't apply on blocks that not belong to core #46454

Open
Trekky12 opened this issue Dec 11, 2022 · 0 comments
Open
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Enhancement A suggestion for improvement.

Comments

@Trekky12
Copy link

Description

Apparently the "elements" styling on blocks other than the core blocks is not working with the current gutenberg version.

The reasons seems to be that the elements styling is filtered to core blocks in

$result = array_values(
array_filter(
$metadata['path'],
function ( $item ) {
if ( str_contains( $item, 'core/' ) ) {
return true;
}
return false;
}
)
);

Step-by-step reproduction instructions

  1. Install a plugin with a custom block
  2. Add the block to the site in FSE
  3. Change your theme.json and add element styling for e.g. links
  4. See that styling is not applied on the block

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

No

@kathrynwp kathrynwp added [Type] Enhancement A suggestion for improvement. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants