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.
    1. .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:


    1. // Wrap | Classes -------------------
    2. if( key_exists( 'attr', $wrap ) ){
    3. $wrap_class[] = $wrap['attr']['class'];
    4. // Wrap Items | column margin
    5. if( $wrap['attr']['column_margin'] ){
    6. $wrap_class[] = 'column-margin-'. $wrap['attr']['column_margin'];
    7. }
    8. // ****************** Wrap Items | column margin is set to default *********************
    9. if( empty($wrap['attr']['column_margin']) ){
    10. $wrap_class[] = 'column-margin-default'. $wrap['attr']['column_margin'];
    11. }
    12. // Wrap Items | vertical align
    13. if( isset( $wrap['attr']['vertical_align'] ) ){
    14. $wrap_class[] = 'valign-'. $wrap['attr']['vertical_align'];
    15. }
    16. // Wrap | Background size
    17. if( isset( $wrap['attr']['bg_size'] ) && ( $wrap['attr']['bg_size'] != 'auto' ) ){
    18. $wrap_class[] = 'bg-'. $wrap['attr']['bg_size'];
    19. }
    20. }
    21. // Items --------------------------------------------
    22. if( is_array( $wrap['items'] ) ){
    23. foreach( $wrap['items'] as $item ){
    24. if( function_exists( 'mfn_print_'. $item['type'] ) ){
    25. // Item | Size
    26. $class = $classes[$item['size']];
    27. // Item | Type
    28. $class .= ' column_'. $item['type'];
    29. // Item | Custom Classes
    30. if( isset( $item['fields']['classes'] ) ){
    31. $class .= ' '. $item['fields']['classes'];
    32. }
    33. // Column | Margin Bottom
    34. if( $item['type'] == 'column' && ( ! empty( $item['fields']['margin_bottom'] ) ) ){
    35. $class .= ' column-margin-'. $item['fields']['margin_bottom'];
    36. }
    37. // ********************* Column | Margin Bottom is default *********************
    38. if( $item['type'] == 'column' && ( empty( $item['fields']['margin_bottom'] ) ) ){
    39. $class .= ' column-margin-default'. $item['fields']['margin_bottom'];
    40. }
    41. // Print
    42. echo '';
    43. call_user_func( 'mfn_print_'. $item['type'], $item );
    44. echo '';
    45. }
    46. }
    47. }

    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.