Home Forums Meteorite I have a style of 100px top and bottom padding being added to Site Origin rows

This topic is: not resolved

This topic contains 5 replies, has 2 voices, and was last updated by  Terra Themes 2 weeks, 1 day ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1051

    Joker
    Participant

    Hi ya,
    I’m using Meteorite and Site Origin Page Builder.

    It seems to be adding a style=”padding-top: 100px; padding-bottom: 100px; ” directly to the class. Which is very much a no no.

    You can see it below.

    <div class=”meteorite-parallax panel-row-style panel-row-style-for-128-0″ style=”padding-top: 100px; padding-bottom: 100px; ” data-overlay=”true” data-overlay-color=”#000000″>

    At one point I thought I knew that there was someplace to change this, or remove this.

    But I cannot find any place to change this.

    Without being able to remove that 100px top and bottom, it makes it impossible to use since we get MASSIVE gaps between rows.

    Where can I remove this?

    Thanks

    #1052

    Terra Themes
    Keymaster

    Hi @joker,

    you can change the top and bottom padding of each row by clicking on edit row and changing its values in the layout tab.

    #1053

    Joker
    Participant

    Yes, and that’s incredibly annoying since I NEVER want 100px top and bottom of a row. So I have to change EVERY row.

    Can you please make this 100px default an option in the customiser.

    My only other option is to stop using Page Builder completely.

    Or find where in your code this is being inserted and change or remove it.

    • This reply was modified 2 weeks, 3 days ago by  Joker.
    #1055

    Terra Themes
    Keymaster

    I will note your suggestion for the next update.

    The values are set in the Meteorite Extensions plugin in /inc/page-builder.php. You can use this code (inside a child theme) to change the default values.

    function meteorite_child_row_styles_output($attr, $style) {
    	//$attr['style'] = '';
    	if ( !empty($style['padding_top']) ) {
    		$attr['style'] .= 'padding-top: ' . esc_attr($style['padding_top']) . '; ';
    	} else {
    		$attr['style'] .= 'padding-top: 25px; ';		// Your custom default padding-bottom here
    	}
    
    	if ( !empty($style['padding_bottom']) ) {
    		$attr['style'] .= 'padding-bottom: ' . esc_attr($style['padding_bottom']) . '; ';
    	} else {
    		$attr['style'] .= 'padding-bottom: 25px; ';	// Your custom default padding-bottom here
    	}
    	return $attr;
    }
    add_filter('siteorigin_panels_row_style_attributes', 'meteorite_child_row_styles_output', 10, 2);
    #1056

    Joker
    Participant

    Thank you.

    It also looks to me like I could define $style[‘padding_top’] and $style[‘padding_bottom’] variables in the child template…

    Yes?

    #1057

    Terra Themes
    Keymaster

    Well, the $style[padding_top] and $style[padding_bottom] come from the row options. You could modify them in some way, but you should know what you do. You may be unable to change the padding of single rows if you overwrite them in a child theme. But try out what is possible.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.