• There seems to be some markup changes when using a theme.json file. For example when wp-block-image align classes are applied, they no longer have a wrapper class. I.e. the “alignleft” class will be added directly to the wp-block-image element.

    This never used to be the case. It used to be wrapped inside a div with the figure element nested, and the align class added to that instead, which made it easier to align the block properly with CSS.

    Is there anyway to re-add this or revert it without removing the theme.json file?

Viewing 1 replies (of 1 total)
  • modifying the theme.json file to include a wrapper div around the wp-block-image element may be the most elegant solution, but custom CSS could also work if you’re unable to modify the theme.json file. I fixed this for my client in the past.

    However, the best solution will depend on your specific use case and how your theme is set up.

Viewing 1 replies (of 1 total)
  • The topic ‘Block Markup with theme.json’ is closed to new replies.