// Outputs calculated styles // ------------------------------------------------------------------------------- // @param $width [Value] : width // @param $margin-right [Value] : right margin // @param $margin-left [Value] : left margin // ------------------------------------------------------------------------------- // @output [Styles...] @mixin outputFlint ($width, $margin-right, $margin-left) { width: $width; margin-right: $margin-right; margin-left: $margin-left; @content; } // Calculate widths, save all variables to instance // ------------------------------------------------------------------------------- // @param $calcKey [Values...] : breakpoint key // @param $calcSpan [Values...] : span // @param $calcContext [Values...] : context // @param $calcGutter [Values...] : gutter // @param $calcShift [Values...] : shift // @param $i [Index] : index if variable length is > 1 // ------------------------------------------------------------------------------- // @output [Styles...] @mixin calcFlint ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $i: NULL) { @if $i != NULL { @if length($calcKey) > 1 { $calcKey: nth($calcKey, $i); } @if length($calcSpan) > 1 { $calcSpan: nth($calcSpan, $i); } @if length($calcContext) > 1 { $calcContext: nth($calcContext, $i); } @if length($calcGutter) > 1 { $calcGutter: nth($calcGutter, $i); } @if length($calcShift) > 1 { $calcShift: nth($calcShift, $i); } } // Hide if span is zero @if $calcSpan == 0 { $outputWidth: 0; $outputMarginRight: 0; $outputMarginLeft: 0; // First check if it's the default, so we don't hide the element on all breakpoints @if $calcKey == get-value(settings, default) { @include _($calcKey) { display: none; } } @else { display: none; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else { @if $calcShift != NULL and $calcContext == NULL { @if $calcGutter == NULL or $calcGutter == "normal" or $calcGutter == "default" or $calcGutter == "regular" and get-value(settings, gutter) != false { // Save to variables for instance creation $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan))*2); $outputMarginRight: calc-margin($calcKey, $calcSpan); $outputMarginLeft: ( if( $calcShift > 0, (calc-margin($calcKey, $calcSpan)) + (calc-width($calcKey, $calcShift)), (calc-margin($calcKey, -$calcSpan)) + (calc-width($calcKey, $calcShift)) )); // Output styles @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } // Create new instance for memoization @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); // If debug mode, print instance @include debugPrintInstance($calcKey); } @else if $calcGutter == "inside" and get-value(settings, gutter) != false { $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan))*4); $outputMarginRight: calc-margin($calcKey, $calcSpan); $outputMarginLeft: ( if( $calcShift > 0, (calc-margin($calcKey, $calcSpan)) + (calc-width($calcKey, $calcShift)), (calc-margin($calcKey, -$calcSpan)) + (calc-width($calcKey, $calcShift)) )); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else if $calcGutter == "alpha" or $calcGutter == "no-left" or $calcGutter == "first" and get-value(settings, gutter) != false { $outputWidth: (calc-width($calcKey, $calcSpan)) - (calc-margin($calcKey, $calcSpan)); $outputMarginRight: calc-margin($calcKey, $calcSpan); $outputMarginLeft: ( if( $calcShift > 0, calc-width($calcKey, $calcShift), calc-width($calcKey, $calcShift) )); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else if $calcGutter == "omega" or $calcGutter == "no-right" or $calcGutter == "last" and get-value(settings, gutter) != false { $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan))); $outputMarginRight: 0; $outputMarginLeft: ( if( $calcShift > 0, (calc-margin($calcKey, $calcSpan)) + (calc-width($calcKey, $calcShift)), (calc-margin($calcKey, -$calcSpan)) + (calc-width($calcKey, $calcShift)) )); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else if $calcGutter == "row" or $calcGutter == "none" or get-value(settings, gutter) == false { $outputWidth: (calc-width($calcKey, $calcSpan)); $outputMarginRight: 0; $outputMarginLeft: ( if( $calcShift > 0, calc-width($calcKey, $calcShift), calc-width($calcKey, $calcShift) )); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } @else if $calcContext != NULL { // Check if context of parent instance exists $exists: get-family-instance($calcKey); @if $calcShift != NULL { @if $calcGutter == NULL or $calcGutter == "normal" or $calcGutter == "default" or $calcGutter == "regular" and get-value(settings, gutter) != false { // Check if context is set to auto @if $calcContext == "auto" { // Does parent exist? @if $exists != false { $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - ((calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))))*2); $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))); $outputMarginLeft: ( if( $calcShift > 0, (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span)))), (calc-margin($calcKey, -$calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span)))) )); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else { // Else warn that context should not be set to `auto` @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`"; } // Output styles normally if not set to auto } @else { $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - ((calc-margin($calcKey, $calcSpan, $calcContext))*2); $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext); $outputMarginLeft: ( if( $calcShift > 0, (calc-margin($calcKey, $calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext)), (calc-margin($calcKey, -$calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext)) )); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } @else if $calcGutter == "inside" and get-value(settings, gutter) != false { @if $calcContext == "auto" { @if $exists != false { $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - ((calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))))*4); $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))); $outputMarginLeft: ( if( $calcShift > 0, (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span)))), (calc-margin($calcKey, -$calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span)))) )); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else { // Else warn that context should not be set to `auto` @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`"; } // Output styles normally if not set to auto } @else { $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - ((calc-margin($calcKey, $calcSpan, $calcContext))*2); $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext); $outputMarginLeft: ( if( $calcShift > 0, (calc-margin($calcKey, $calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext)), (calc-margin($calcKey, -$calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext)) )); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } @else if $calcGutter == "alpha" or $calcGutter == "no-left" or $calcGutter == "first" and get-value(settings, gutter) != false { @if $calcContext == "auto" { @if $exists != false { $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))); $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))); $outputMarginLeft: ( if( $calcShift > 0, calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span))), calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span))) )); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else { @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`"; } } @else { $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - (calc-margin($calcKey, $calcSpan, $calcContext)); $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext); $outputMarginLeft: ( if( $calcShift > 0, calc-width($calcKey, $calcShift, $calcContext), calc-width($calcKey, $calcShift, $calcContext) )); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } @else if $calcGutter == "omega" or $calcGutter == "no-right" or $calcGutter == "last" and get-value(settings, gutter) != false { @if $calcContext == "auto" { @if $exists != false { $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - ((calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))))); $outputMarginRight: 0; $outputMarginLeft: ( if( $calcShift > 0, (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span)))), (calc-margin($calcKey, -$calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span)))) )); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else { @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`"; } } @else { $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - ((calc-margin($calcKey, $calcSpan, $calcContext))); $outputMarginRight: 0; $outputMarginLeft: ( if( $calcShift > 0, (calc-margin($calcKey, $calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext)), (calc-margin($calcKey, -$calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext)) )); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } @else if $calcGutter == "row" or $calcGutter == "none" or get-value(settings, gutter) == false { @if $calcContext == "auto" { @if $exists != false { $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))); $outputMarginRight: 0; $outputMarginLeft: ( if( $calcShift > 0, calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span))), calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span))) )); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else { @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`"; } } @else { $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)); $outputMarginRight: 0; $outputMarginLeft: ( if( $calcShift > 0, calc-width($calcKey, $calcShift, $calcContext), calc-width($calcKey, $calcShift, $calcContext) )); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } } @else { @if $calcGutter == NULL or $calcGutter == "normal" or $calcGutter == "default" or $calcGutter == "regular" and get-value(settings, gutter) != false { // Check if context is set to auto @if $calcContext == "auto" { // Did it exist? @if $exists != false { $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - ((calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))))*2); $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))); $outputMarginLeft: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else { // Else warn that context should not be set to `auto` @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`"; } // Output styles normally if not set to auto } @else { $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - ((calc-margin($calcKey, $calcSpan, $calcContext))*2); $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext); $outputMarginLeft: calc-margin($calcKey, $calcSpan, $calcContext); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } @else if $calcGutter == "inside" and get-value(settings, gutter) != false { @if $calcContext == "auto" { @if $exists != false { $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - ((calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))))*4); $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))); $outputMarginLeft: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else { @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`"; } } @else { $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - ((calc-margin($calcKey, $calcSpan, $calcContext))*2); $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext); $outputMarginLeft: calc-margin($calcKey, $calcSpan, $calcContext); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } @else if $calcGutter == "alpha" or $calcGutter == "no-left" or $calcGutter == "first" and get-value(settings, gutter) != false { @if $calcContext == "auto" { @if $exists != false { $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))); $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))); $outputMarginLeft: 0; @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else { @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`"; } } @else { $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - (calc-margin($calcKey, $calcSpan, $calcContext)); $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext); $outputMarginLeft: 0; @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } @else if $calcGutter == "omega" or $calcGutter =="no-right" or $calcGutter == "last" and get-value(settings, gutter) != false { @if $calcContext == "auto" { @if $exists != false { $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))); $outputMarginRight: 0; $outputMarginLeft: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else { @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`"; } } @else { $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - (calc-margin($calcKey, $calcSpan, $calcContext)); $outputMarginRight: 0; $outputMarginLeft: calc-margin($calcKey, $calcSpan, $calcContext); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } @else if $calcGutter == "row" or $calcGutter == "none" or get-value(settings, gutter) == false { @if $calcContext == "auto" { @if $exists != false { $outputWidth: calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))); $outputMarginRight: 0; $outputMarginLeft: 0; @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else { @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`"; } } @else { $outputWidth: calc-width($calcKey, $calcSpan, $calcContext); $outputMarginRight: 0; $outputMarginLeft: 0; @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } } } @else { @if $calcGutter == NULL or $calcGutter == "normal" or $calcGutter == "default" or $calcGutter == "regular" and get-value(settings, gutter) != false { $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan))*2); $outputMarginRight: calc-margin($calcKey, $calcSpan); $outputMarginLeft: calc-margin($calcKey, $calcSpan); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else if $calcGutter == "inside" and get-value(settings, gutter) != false { $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan))*4); $outputMarginRight: calc-margin($calcKey, $calcSpan); $outputMarginLeft: calc-margin($calcKey, $calcSpan); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else if $calcGutter == "alpha" or $calcGutter == "no-left" or $calcGutter == "first" and get-value(settings, gutter) != false { $outputWidth: (calc-width($calcKey, $calcSpan)) - (calc-margin($calcKey, $calcSpan)); $outputMarginRight: calc-margin($calcKey, $calcSpan); $outputMarginLeft: 0; @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else if $calcGutter == "omega" or $calcGutter == "no-right" or $calcGutter == "last" and get-value(settings, gutter) != false { $outputWidth: (calc-width($calcKey, $calcSpan)) - (calc-margin($calcKey, $calcSpan)); $outputMarginRight: 0; $outputMarginLeft: calc-margin($calcKey, $calcSpan); @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else if $calcGutter == "row" or $calcGutter == "none" or get-value(settings, gutter) == false { $outputWidth: calc-width($calcKey, $calcSpan); $outputMarginRight: 0; $outputMarginLeft: 0; @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } } }