diff --git a/lib/blocks.php b/lib/blocks.php index aa0d82c7795d44..e38cbdcf59ae2c 100644 --- a/lib/blocks.php +++ b/lib/blocks.php @@ -199,7 +199,7 @@ function gutenberg_register_core_block_assets( $block_name ) { wp_register_style( "wp-block-{$block_name}", gutenberg_url( $style_path ), - array( 'global-styles' ), + array(), $default_version ); wp_style_add_data( "wp-block-{$block_name}", 'rtl', 'replace' ); @@ -207,7 +207,7 @@ function gutenberg_register_core_block_assets( $block_name ) { // Add a reference to the stylesheet's path to allow calculations for inlining styles in `wp_head`. wp_style_add_data( "wp-block-{$block_name}", 'path', gutenberg_dir_path() . $style_path ); } else { - wp_register_style( "wp-block-{$block_name}", false, array( 'global-styles' ) ); + wp_register_style( "wp-block-{$block_name}", false, array() ); } // If the current theme supports wp-block-styles, dequeue the full stylesheet @@ -246,7 +246,7 @@ function() { wp_register_style( "wp-block-{$block_name}", gutenberg_url( $theme_style_path ), - array( 'global-styles' ), + array(), $default_version ); wp_style_add_data( "wp-block-{$block_name}", 'path', gutenberg_dir_path() . $theme_style_path ); diff --git a/packages/block-library/src/button/block.json b/packages/block-library/src/button/block.json index f86030c7460a57..d4a4f308721f82 100644 --- a/packages/block-library/src/button/block.json +++ b/packages/block-library/src/button/block.json @@ -89,7 +89,7 @@ "radius": true } }, - "__experimentalSelector": ".wp-block-button__link" + "__experimentalSelector": ".wp-block-button .wp-block-button__link" }, "styles": [ { "name": "fill", "label": "Fill", "isDefault": true }, diff --git a/packages/block-library/src/button/style.scss b/packages/block-library/src/button/style.scss index e5544d7e148083..984027ddbd93a1 100644 --- a/packages/block-library/src/button/style.scss +++ b/packages/block-library/src/button/style.scss @@ -102,18 +102,18 @@ $blocks-block__margin: 0.5em; border-radius: 0 !important; } -.is-style-outline > :where(.wp-block-button__link), -:where(.wp-block-button__link).is-style-outline { +.wp-block-button.is-style-outline > .wp-block-button__link, +.wp-block-button .wp-block-button__link.is-style-outline { border: 2px solid currentColor; padding: 0.667em 1.333em; } -.is-style-outline > .wp-block-button__link:not(.has-text-color), -.wp-block-button__link.is-style-outline:not(.has-text-color) { +.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color), +.wp-block-button .wp-block-button__link.is-style-outline:not(.has-text-color) { color: currentColor; } -.is-style-outline > .wp-block-button__link:not(.has-background), -.wp-block-button__link.is-style-outline:not(.has-background) { +.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background), +.wp-block-button .wp-block-button__link.is-style-outline:not(.has-background) { background-color: transparent; }