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: Always load block CSS from __experimentalStyle #42005

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

scruffian
Copy link
Contributor

@scruffian scruffian commented Jun 28, 2022

What?

We need to always load the styles from __experimentalStyle, not just when assets are being split.

Why?

This needs to happen so that the __experimentalStyle rules are always applied.

How?

We attach the block styles to the end of the global styles CSS.

Testing Instructions

  1. Switch to the theme Toujours
  2. Add two images to a post
  3. Ensure that there is a 1em margin between the two images.

Fixes Automattic/wp-calypso#64994

Screenshots or screencast

Screenshot 2022-06-28 at 12 58 39

@WordPress/block-themers

@scruffian scruffian added the Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json label Jun 28, 2022
@scruffian scruffian requested a review from spacedmonkey as a code owner June 28, 2022 11:59
@scruffian scruffian self-assigned this Jun 28, 2022
@draganescu draganescu added [Type] Bug An existing feature does not function as intended Needs Testing Needs further testing to be confirmed. Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. and removed Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta labels Jun 28, 2022
Copy link
Contributor

@draganescu draganescu left a comment

Choose a reason for hiding this comment

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

The code looks like it does what the PR says and I tested for the fixed Toujours bug which is gone with this patch.

@scruffian
Copy link
Contributor Author

scruffian commented Jun 28, 2022

I'm going to hold off merging for a bit in case anyone has any thoughts about the fact that this will alter theme buttons...

This was relevant to a different PR, sorry!

@oandregal
Copy link
Member

There is a conversation at core about how this works for classic themes, see https://core.trac.wordpress.org/ticket/56467#comment:408 @scruffian @draganescu

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. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json Needs Testing Needs further testing to be confirmed. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Toujours: Image Block Spacing
3 participants