Skip to content

Commit 084fd6c

Browse files
fix (theme.json support): removed theme.json inheritance for column gap since it destroys our design library
1 parent 8535c8d commit 084fd6c

File tree

1 file changed

+6
-4
lines changed
  • src/plugins/theme-block-style-inheritance

1 file changed

+6
-4
lines changed

src/plugins/theme-block-style-inheritance/index.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ function add_block_style_inheritance( $current_css ) {
176176
* so we manually retrieve them and add to the `:root` declarations
177177
*/
178178
$root_properties = array(
179-
'columns-gap' => $this->get_value( $styles, ['blocks', 'core/columns', 'spacing', 'blockGap'] ),
179+
// DEV NOTE: Remove column gap from inheritance since it breaks our design library.
180+
// 'columns-gap' => $this->get_value( $styles, ['blocks', 'core/columns', 'spacing', 'blockGap'] ),
180181
'button-group-gap' => $this->get_value( $styles, ['blocks', 'core/buttons', 'spacing', 'blockGap'] ),
181182
'default-gap' => $this->get_value( $styles, ['spacing', 'blockGap'] ),
182183
'container-color' => $this->get_value( $styles, ['color', 'text'] ),
@@ -187,9 +188,10 @@ function add_block_style_inheritance( $current_css ) {
187188
$style_declarations['root']['declarations'][ '--stk-button-row-gap' ] = $root_properties[ 'button-group-gap' ] ?? $root_properties[ 'default-gap' ];
188189
}
189190

190-
if ( $root_properties[ 'columns-gap' ] || $root_properties[ 'default-gap' ] ) {
191-
$style_declarations['root']['declarations'][ '--stk-columns-column-gap' ] = $root_properties[ 'columns-gap' ] ?? $root_properties[ 'default-gap' ];
192-
}
191+
// DEV NOTE: Remove column gap from inheritance since it breaks our design library.
192+
// if ( $root_properties[ 'columns-gap' ] || $root_properties[ 'default-gap' ] ) {
193+
// $style_declarations['root']['declarations'][ '--stk-columns-column-gap' ] = $root_properties[ 'columns-gap' ] ?? $root_properties[ 'default-gap' ];
194+
// }
193195

194196
if ( $root_properties[ 'container-color' ] ) {
195197
$style_declarations['root']['declarations'][ '--stk-container-color' ] = $root_properties[ 'container-color' ];

0 commit comments

Comments
 (0)