Set Layout > Margin | Bottom to zero for all

Is there a way to set this to be zero instead of default? I find that I am going in to always set this to zero for items and wasn't sure if there was a global setting to change this (either in the options panel or through functions/code files). 

Comments

  • Hi,
    do you mean the column options?
    You have to change it manually.
    thanks
  • Both the column and the wrapper options, is there no way to override this to be zero? Even if its from a code level?
  • Yes, we can make the columns have 0 margin bottom with css, all times.
    .column {margin-bottom:0 !important; }
  • edited May 2018
    Can I make a recommendation or a request for update that would add a class for when at default? 

    something like:


    
    // Wrap | Classes -------------------
    
    if( key_exists( 'attr', $wrap ) ){
    
    	$wrap_class[] = $wrap['attr']['class'];
    
    	// Wrap Items | column margin
    	if( $wrap['attr']['column_margin'] ){
    		$wrap_class[] = 'column-margin-'. $wrap['attr']['column_margin'];
    	}
    
    	// ****************** Wrap Items | column margin is set to default *********************
    	if( empty($wrap['attr']['column_margin']) ){
    		$wrap_class[] = 'column-margin-default'. $wrap['attr']['column_margin'];
    	}
    
    	// Wrap Items | vertical align
    	if( isset( $wrap['attr']['vertical_align'] ) ){
    		$wrap_class[] = 'valign-'. $wrap['attr']['vertical_align'];
    	}
    
    	// Wrap | Background size
    	if( isset( $wrap['attr']['bg_size'] ) && ( $wrap['attr']['bg_size'] != 'auto' ) ){
    		$wrap_class[] = 'bg-'. $wrap['attr']['bg_size'];
    	}
    
    }
    
    
    
    
    // Items --------------------------------------------
    
    if( is_array( $wrap['items'] ) ){
    	foreach( $wrap['items'] as $item ){
    
    		if( function_exists( 'mfn_print_'. $item['type'] ) ){
    
    			// Item | Size
    			$class  = $classes[$item['size']];
    
    			// Item | Type
    			$class .= ' column_'. $item['type'];
    
    			// Item | Custom Classes
    			if( isset( $item['fields']['classes'] ) ){
    				$class .= ' '. $item['fields']['classes'];
    			}
    
    			// Column | Margin Bottom
    			if( $item['type'] == 'column' && ( ! empty( $item['fields']['margin_bottom'] ) ) ){
    				$class .= ' column-margin-'. $item['fields']['margin_bottom'];
    			}
    
    			// ********************* Column | Margin Bottom is default *********************
    			if( $item['type'] == 'column' && ( empty( $item['fields']['margin_bottom'] ) ) ){
    				$class .= ' column-margin-default'. $item['fields']['margin_bottom'];
    			}
    
    
    			// Print
    			echo '';
    				call_user_func( 'mfn_print_'. $item['type'], $item );
    			echo '';
    
    		}
    
    	}
    }
    

    this would allow us to set a default margin through CSS for that option if desired. Or even placing a "Default Margin" option in the theme options under a panel.

  • I will pass this to the dev team, thank you for your insight.
Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.