stylesheets/flint/mixins/lib/_flint-calculate.scss in flint-gs-1.0.7 vs stylesheets/flint/mixins/lib/_flint-calculate.scss in flint-gs-1.0.8

- old
+ new

@@ -46,19 +46,27 @@ } // 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 { @@ -75,11 +83,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } // Create new instance for memoization - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @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 { @@ -93,11 +101,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else if $calcGutter == "alpha" or $calcGutter == "no-left" and get-value(settings, gutter) != false { $outputWidth: (calc-width($calcKey, $calcSpan)) - (calc-margin($calcKey, $calcSpan)); @@ -109,11 +117,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else if $calcGutter == "omega" or $calcGutter == "no-right" and get-value(settings, gutter) != false { $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan))); @@ -125,11 +133,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @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)); @@ -141,11 +149,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } @else if $calcContext != NULL { // Check if context of parent instance exists @@ -167,11 +175,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @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()}`"; @@ -188,11 +196,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } @else if $calcGutter == "inside" and get-value(settings, gutter) != false { @@ -208,11 +216,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @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()}`"; @@ -229,11 +237,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } @else if $calcGutter == "alpha" or $calcGutter == "no-left" and get-value(settings, gutter) != false { @@ -249,11 +257,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @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()}`"; } @@ -268,11 +276,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } @else if $calcGutter == "omega" or $calcGutter == "no-right" and get-value(settings, gutter) != false { @@ -288,11 +296,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @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()}`"; } @@ -307,11 +315,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @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 { @@ -327,11 +335,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @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()}`"; } @@ -346,11 +354,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @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 { @@ -365,11 +373,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @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()}`"; @@ -383,11 +391,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } @else if $calcGutter == "inside" and get-value(settings, gutter) != false { @@ -400,11 +408,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @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()}`"; } @@ -416,11 +424,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } @else if $calcGutter == "alpha" or $calcGutter == "no-left" and get-value(settings, gutter) != false { @@ -433,11 +441,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @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()}`"; } @@ -449,11 +457,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } @else if $calcGutter == "omega" or $calcGutter =="no-right" and get-value(settings, gutter) != false { @@ -466,11 +474,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @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()}`"; } @@ -482,11 +490,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @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 { @@ -499,11 +507,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @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()}`"; } @@ -515,11 +523,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } } @@ -533,11 +541,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @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); @@ -546,11 +554,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else if $calcGutter == "alpha" or $calcGutter == "no-left" and get-value(settings, gutter) != false { $outputWidth: (calc-width($calcKey, $calcSpan)) - (calc-margin($calcKey, $calcSpan)); @@ -559,11 +567,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } @else if $calcGutter == "omega" or $calcGutter == "no-right" and get-value(settings, gutter) != false { $outputWidth: (calc-width($calcKey, $calcSpan)) - (calc-margin($calcKey, $calcSpan)); @@ -572,11 +580,11 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @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); @@ -585,10 +593,10 @@ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) { @content; } - @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); + @include newInstance($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft); @include debugPrintInstance($calcKey); } } } \ No newline at end of file