Skip to content

Commit d7b60e0

Browse files
committed
Editor: Fix invalid navigation overlay patterns
Fixes the following two patterns: - Navigation Overlay: Add explicit black text and link colors so the default overlay pattern remains readable even when the active theme uses white text. - Overlay with site info and CTA: Fix invalid block attributes to prevent the block from breaking. Follow-up to [61609]. Props isabel_brison, mikachan, onemaggie, westonruter, wildworks. See #64589. git-svn-id: https://develop.svn.wordpress.org/trunk@62114 602fd350-edb4-49c9-b593-d223f7449a82
1 parent ae535b3 commit d7b60e0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/wp-includes/block-patterns/navigation-overlay-centered-with-extras.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
'title' => _x( 'Overlay with site info and CTA', 'Block pattern title' ),
1010
'blockTypes' => array( 'core/template-part/navigation-overlay' ),
1111
'categories' => array( 'navigation' ),
12-
'content' => '<!-- wp:group {"metadata":{"name":"' . esc_attr( __( 'Navigation Overlay' ) ) . '"},"style":{"spacing":{"padding":{"right":"var:preset|spacing|40","left":"var:preset|spacing|40","top":"var:preset|spacing|40","bottom":"var:preset|spacing|40"}},"dimensions":{"minHeight":"100vh"},"elements":{"link":{"color":{"text":"var:preset|color|black"}}},"backgroundColor":"white","textColor":"black","layout":{"type":"default"}} -->
12+
'content' => '<!-- wp:group {"metadata":{"name":"' . esc_attr( __( 'Navigation Overlay' ) ) . '"},"style":{"spacing":{"padding":{"right":"var:preset|spacing|40","left":"var:preset|spacing|40","top":"var:preset|spacing|40","bottom":"var:preset|spacing|40"}},"dimensions":{"minHeight":"100vh"},"elements":{"link":{"color":{"text":"var:preset|color|black"}}}},"backgroundColor":"white","textColor":"black","layout":{"type":"default"}} -->
1313
<div class="wp-block-group has-black-color has-white-background-color has-text-color has-background has-link-color" style="min-height:100vh;padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)"><!-- wp:group {"align":"wide","layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"right"}} -->
1414
<div class="wp-block-group alignwide"><!-- wp:navigation-overlay-close /--></div>
1515
<!-- /wp:group -->

src/wp-includes/block-patterns/navigation-overlay.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
'title' => _x( 'Navigation Overlay', 'Block pattern title' ),
1010
'blockTypes' => array( 'core/template-part/navigation-overlay' ),
1111
'categories' => array( 'navigation' ),
12-
'content' => '<!-- wp:group {"metadata":{"name":"' . esc_attr( __( 'Navigation Overlay' ) ) . '"},"style":{"spacing":{"padding":{"right":"var:preset|spacing|40","left":"var:preset|spacing|40","top":"var:preset|spacing|40","bottom":"var:preset|spacing|40"}},"dimensions":{"minHeight":"100vh"}},"backgroundColor":"white","layout":{"type":"default"}} -->
13-
<div class="wp-block-group has-white-background-color has-background" style="min-height:100vh;padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)"><!-- wp:group {"align":"wide","layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"right"}} -->
12+
'content' => '<!-- wp:group {"metadata":{"name":"' . esc_attr( __( 'Navigation Overlay' ) ) . '"},"style":{"spacing":{"padding":{"right":"var:preset|spacing|40","left":"var:preset|spacing|40","top":"var:preset|spacing|40","bottom":"var:preset|spacing|40"}},"dimensions":{"minHeight":"100vh"},"elements":{"link":{"color":{"text":"var:preset|color|black"}}}},"backgroundColor":"white","textColor":"black","layout":{"type":"default"}} -->
13+
<div class="wp-block-group has-black-color has-white-background-color has-text-color has-background has-link-color" style="min-height:100vh;padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)"><!-- wp:group {"align":"wide","layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"right"}} -->
1414
<div class="wp-block-group alignwide"><!-- wp:navigation-overlay-close /--></div>
1515
<!-- /wp:group -->
1616

0 commit comments

Comments
 (0)