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.