Sha256: d1c1e1151cff471a63cf9f6044df05601d6f528d13b7dcd2efea9f50c8a66ec1

Contents?: true

Size: 1.53 KB

Versions: 6

Compression:

Stored size: 1.53 KB

Contents

// Keeps count of all instances with arguments, stores in global var
// -------------------------------------------------------------------------------
// @dependence `get-value()`
// -------------------------------------------------------------------------------
// @param $key [Breakpoint] : computed breakpoint of instance
// @param $span [Value] : computed span of instance
// @param $context [Value] : computed context of instance
// @param $gutter [Value] : computed gutter of instance
// @param $shift [Value] : computed shift of instance
// @param $outputWidth [Value] : computed width of instance
// @param $outputMarginRight [Value] : computed right margin of instance
// @param $outputMarginLeft [Value] : computed left margin of instance
// -------------------------------------------------------------------------------
// @return [Value] | map

@function instance($key, $span, $context, $gutter, $shift, $outputWidth, $outputMarginRight, $outputMarginLeft) {
    $flint__instance-count: $flint__instance-count + 1 !global;

    $flint__instance: (
		"#{selector_string()}::#{$key}": (
			"instance-count": #{$flint__instance-count},
			"key": #{$key},
			"breakpoint": #{get-value($key, breakpoint)},
			"columns": #{get-value($key, columns)},
			"span": #{$span},
			"context": #{$context},
			"gutter": #{$gutter},
			"shift": #{$shift},
			"outputted": (
				"width": #{$outputWidth},
				"margin-right": #{$outputMarginRight},
				"margin-left": #{$outputMarginLeft},
			),
		),
    );
    
    @return map-merge($flint__instances, $flint__instance);
}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
flint-gs-1.0.9 stylesheets/flint/functions/lib/_instance.scss
flint-gs-1.0.8 stylesheets/flint/functions/lib/_instance.scss
flint-gs-1.0.7 stylesheets/flint/functions/lib/_instance.scss
flint-gs-1.0.6 stylesheets/flint/functions/lib/_instance.scss
flint-gs-1.0.5 stylesheets/flint/functions/lib/_instance.scss
flint-gs-1.0.4 stylesheets/flint/functions/lib/_instance.scss