Skip to content

Commit

Permalink
Block Styles: Fix ordering of stylesheets when a style variation is a…
Browse files Browse the repository at this point in the history
…pplied.

Adjusts the dependency order to ensure stylesheets are output in the correct order.

Syncs the PHP changes from WordPress/gutenberg#63918.

Reviewed by hellofromTonya.
Merges [58850] to the 6.6 branch.

Props talldanwp, aaronrobertshaw, andrewserong, aristath, mukesh27, ramonopoly, ytfeldrawkcab.
Fixes #61748.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58861 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
hellofromtonya committed Aug 7, 2024
1 parent 50af37a commit 3f8f236
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/block-supports/block-style-variations.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ function wp_render_block_style_variation_support_styles( $parsed_block ) {
return $parsed_block;
}

wp_register_style( 'block-style-variation-styles', false, array( 'global-styles', 'wp-block-library' ) );
wp_register_style( 'block-style-variation-styles', false, array( 'wp-block-library', 'global-styles' ) );
wp_add_inline_style( 'block-style-variation-styles', $variation_styles );

/*
Expand Down

0 comments on commit 3f8f236

Please sign in to comment.