Changeset 65877
- Timestamp:
- 12/03/2026 08:06:32 AM (12 hours ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
src/wp-includes/block-supports/layout.php (modified) (1 diff)
-
tests/phpunit/tests/block-supports/layout.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-supports/layout.php
r65212 r65877 766 766 767 767 if ( 'horizontal' === $layout_orientation ) { 768 $justify_content_options += array( 'space-between' => 'space-between' ); 768 $justify_content_options += array( 769 'space-between' => 'space-between', 770 'space-around' => 'space-around', 771 'space-evenly' => 'space-evenly', 772 ); 769 773 $vertical_alignment_options += array( 'stretch' => 'stretch' ); 770 774 } else { -
trunk/tests/phpunit/tests/block-supports/layout.php
r65212 r65877 1367 1367 1368 1368 /** 1369 * Tests additional flex justification values. 1370 * 1371 * @dataProvider data_wp_get_layout_style_with_additional_flex_justification 1372 * 1373 * @covers ::wp_get_layout_style 1374 * 1375 * @param array $layout Flex layout values. 1376 * @param string $expected_output The expected output. 1377 */ 1378 public function test_wp_get_layout_style_with_additional_flex_justification( $layout, $expected_output ) { 1379 $this->assertSame( $expected_output, wp_get_layout_style( '.wp-layout', $layout ) ); 1380 } 1381 1382 /** 1383 * Data provider for test_wp_get_layout_style_with_additional_flex_justification(). 1384 * 1385 * @return array 1386 */ 1387 public function data_wp_get_layout_style_with_additional_flex_justification() { 1388 return array( 1389 'horizontal flex layout with space-around justification' => array( 1390 'layout' => array( 1391 'type' => 'flex', 1392 'orientation' => 'horizontal', 1393 'justifyContent' => 'space-around', 1394 ), 1395 'expected_output' => '.wp-layout{justify-content:space-around;}', 1396 ), 1397 'horizontal flex layout with space-evenly justification' => array( 1398 'layout' => array( 1399 'type' => 'flex', 1400 'orientation' => 'horizontal', 1401 'justifyContent' => 'space-evenly', 1402 ), 1403 'expected_output' => '.wp-layout{justify-content:space-evenly;}', 1404 ), 1405 ); 1406 } 1407 1408 /** 1369 1409 * Tests that a constrained layout with non-string contentSize/wideSize/justifyContent 1370 1410 * values (e.g. from hand-edited, imported, or AI-generated content) does not cause a
Note:
See TracChangeset
for help on using the changeset viewer.