Changeset 52402 for trunk/src/wp-includes/block-supports/layout.php
- Timestamp:
- 12/21/2021 07:00:16 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-supports/layout.php
r52380 r52402 105 105 if ( 'horizontal' === $layout_orientation ) { 106 106 $style .= 'align-items: center;'; 107 if ( ! empty( $layout['setCascadingProperties'] ) && $layout['setCascadingProperties'] ) {108 $style .= '--layout-direction: row;';109 }110 107 /** 111 108 * Add this style only if is not empty for backwards compatibility, … … 115 112 if ( ! empty( $layout['justifyContent'] ) && array_key_exists( $layout['justifyContent'], $justify_content_options ) ) { 116 113 $style .= "justify-content: {$justify_content_options[ $layout['justifyContent'] ]};"; 117 if ( ! empty( $layout['setCascadingProperties'] ) && $layout['setCascadingProperties'] ) {118 // --layout-justification-setting allows children to inherit the value regardless or row or column direction.119 $style .= "--layout-justification-setting: {$justify_content_options[ $layout['justifyContent'] ]};";120 $style .= "--layout-wrap: $flex_wrap;";121 $style .= "--layout-justify: {$justify_content_options[ $layout['justifyContent'] ]};";122 $style .= '--layout-align: center;';123 }124 114 } 125 115 } else { … … 127 117 if ( ! empty( $layout['justifyContent'] ) && array_key_exists( $layout['justifyContent'], $justify_content_options ) ) { 128 118 $style .= "align-items: {$justify_content_options[ $layout['justifyContent'] ]};"; 129 if ( ! empty( $layout['setCascadingProperties'] ) && $layout['setCascadingProperties'] ) {130 $style .= '--layout-direction: column;';131 }132 if ( ! empty( $layout['setCascadingProperties'] ) && $layout['setCascadingProperties'] ) {133 // --layout-justification-setting allows children to inherit the value regardless or row or column direction.134 $style .= "--layout-justification-setting: {$justify_content_options[ $layout['justifyContent'] ]};";135 $style .= '--layout-justify: initial;';136 $style .= "--layout-align: {$justify_content_options[ $layout['justifyContent'] ]};";137 }138 119 } 139 120 }
Note: See TracChangeset
for help on using the changeset viewer.