diff --git a/packages/block-library/src/navigation/index.php b/packages/block-library/src/navigation/index.php index f814e19a13cd37..44c4d1410f4bee 100644 --- a/packages/block-library/src/navigation/index.php +++ b/packages/block-library/src/navigation/index.php @@ -519,9 +519,11 @@ private static function get_responsive_container_markup( $attributes, $inner_blo '; } + $overlay_inline_styles = esc_attr( safecss_filter_attr( $colors['overlay_inline_styles'] ) ); + return sprintf( ' -
+
@@ -537,7 +539,7 @@ private static function get_responsive_container_markup( $attributes, $inner_blo $toggle_aria_label_close, esc_attr( implode( ' ', $responsive_container_classes ) ), esc_attr( implode( ' ', $open_button_classes ) ), - esc_attr( safecss_filter_attr( $colors['overlay_inline_styles'] ) ), + ( ! empty( $overlay_inline_styles ) ) ? "style=\"$overlay_inline_styles\"" : '', $toggle_button_content, $toggle_close_button_content, $open_button_directives,