Firstly, a big thanks to your for creating this plugin. It had added a lot more functionality to Gutenberg. There is one thing that I have to be honest frustrates me. When I select a row and then click on the Advanced meta tab to add classes to that specific row, it adds them to the outer div not the div that has the ‘row’ class attached. There are buttons to choose hotizontal or verticla alignment but what about space-between and the others or custom ones created by the user? I know it would get really complex to program them all into the interface but it would be great if the Advanced class text area actually added the classes to the row and so people can add the flex utility classes or whatever other classes that they want to the row for maximised flexibility. It does appear to work for the Columns.
Anyway, to create my own personal workaround, I went int the src/templates/row.php and changed the last 5 lines from
<div class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>"> <div class="<?php echo esc_attr( implode( ' ', $row_classes ) ); ?>"> <?php echo $content; // phpcs:ignore ?> </div> </div>
<div class="wp-bootstrap-blocks-row"> <div class="<?php echo esc_attr( implode( ' ', $row_classes ) ); ?> <?php echo esc_attr( implode( ' ', $classes ) ); ?>"> <?php echo $content; // phpcs:ignore ?> </div> </div>
I also emptied the $classes array on line 25. It would be great if theis was part of the plugin if it did not break the roadmap.
Finally, is there the possibility of being able to add an ID to a block, row, button?
Cheers and thanks again for the plugin.
- The topic ‘Classes being added to the block outer and not the row.’ is closed to new replies.