Skip to content

Commit 2835818

Browse files
committed
Adjusted max-width values from 599px to 479px to match breakpoints.scss values
1 parent f29105c commit 2835818

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/wp-includes/block-supports/block-visibility.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function wp_render_block_visibility_support( $block_content, $block ) {
4545
array(
4646
'name' => 'Mobile',
4747
'slug' => 'mobile',
48-
'size' => '599px',
48+
'size' => '479px',
4949
),
5050
array(
5151
'name' => 'Tablet',

tests/phpunit/tests/block-supports/block-visibility.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public function test_block_visibility_support_generated_css_with_mobile_breakpoi
156156
$actual_stylesheet = wp_style_engine_get_stylesheet_from_context( 'block-supports', array( 'prettify' => false ) );
157157

158158
$this->assertSame(
159-
'@media (max-width: 599px){.wp-block-hidden-mobile{display:none !important;}}',
159+
'@media (max-width: 479px){.wp-block-hidden-mobile{display:none !important;}}',
160160
$actual_stylesheet,
161161
'CSS should contain mobile visibility rule'
162162
);
@@ -190,7 +190,7 @@ public function test_block_visibility_support_generated_css_with_tablet_breakpoi
190190
$actual_stylesheet = wp_style_engine_get_stylesheet_from_context( 'block-supports', array( 'prettify' => false ) );
191191

192192
$this->assertSame(
193-
'@media (min-width: calc(599px + 1px)) and (max-width: 959px){.wp-block-hidden-tablet{display:none !important;}}',
193+
'@media (min-width: calc(479px + 1px)) and (max-width: 959px){.wp-block-hidden-tablet{display:none !important;}}',
194194
$actual_stylesheet,
195195
'CSS should contain tablet visibility rule'
196196
);
@@ -263,7 +263,7 @@ public function test_block_visibility_support_generated_css_with_multiple_breakp
263263
$actual_stylesheet = wp_style_engine_get_stylesheet_from_context( 'block-supports', array( 'prettify' => false ) );
264264

265265
$this->assertSame(
266-
'@media (min-width: calc(959px + 1px)){.wp-block-hidden-desktop{display:none !important;}}@media (max-width: 599px){.wp-block-hidden-mobile{display:none !important;}}',
266+
'@media (min-width: calc(959px + 1px)){.wp-block-hidden-desktop{display:none !important;}}@media (max-width: 479px){.wp-block-hidden-mobile{display:none !important;}}',
267267
$actual_stylesheet,
268268
'CSS should contain both visibility rules'
269269
);

0 commit comments

Comments
 (0)