@mixin generate-spacing( 
    $property,
    $directions: ("v": "top" "bottom", "h": "right" "left"),
    $steps: $__steps,
    $ctx: null,
    $negative: false,
    $layout: false
) {

    $p: abbr($property);

    #{dot()}#{$p}0#{$ctx} {
        #{$property}: 0 !important;
    }

    @for $i from 0 to $steps {
                
        #{dot()}#{$p}#{$i + 1}#{$ctx} {
            #{$property}: ms($i) !important;
        }
    }

    @each $a, $directions in $directions {

        @each $direction in $directions {

            $d: abbr($direction);
            $rule: "#{$property}-#{$direction}";

            #{dot()}#{$p}#{$a}0#{$ctx},
            #{dot()}#{$p}#{$d}0#{$ctx} {
                #{$rule}: 0 !important;
            }

            @for $i from 0 to $steps {

                #{dot()}#{$p}#{$a}#{$i + 1}#{$ctx},
                #{dot()}#{$p}#{$d}#{$i + 1}#{$ctx} {
                    #{$rule}: ms($i) !important;
                }

                @if $negative {
                    #{dot()}n#{$p}#{$d}#{$i + 1}#{$ctx} {
                        #{$rule}: ms($i) * -1 !important;
                    }
                }
            }

            @if $layout and $a == "h" {
                @each $cols in $__fractions {
                    @for $i from 1 to $cols {

                        #{dot()}#{$p}#{$d}-#{$i}-#{$cols}#{$ctx} {
                            #{$rule}: percentage($i / $cols) !important;
                        }

                        @if $negative {
                            #{dot()}n#{$p}#{$d}-#{$i}-#{$cols}#{$ctx} {
                                #{$rule}: percentage(($i / $cols) * -1) !important;
                            }
                        }
                    }
                }
            }
        }
    }
}