Sha256: 9a6032deb5a7bfbae695d320cc8a5fa74db8c2b616b1abcc1436da6ea484a123

Contents?: true

Size: 1.51 KB

Versions: 10

Compression:

Stored size: 1.51 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) {
    $instance-count: $instance-count + 1 !global;

    $flint__instance: (
		"#{selector_string()}::#{$key}": (
			"instance-count": #{$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

10 entries across 10 versions & 1 rubygems

Version Path
flint-gs-1.0.3 stylesheets/flint/functions/lib/_instance.scss
flint-gs-1.0.2 stylesheets/flint/functions/lib/_instance.scss
flint-gs-1.0.1 stylesheets/flint/functions/lib/_instance.scss
flint-gs-1.0.0 stylesheets/flint/functions/lib/_instance.scss
flint-gs-0.1.7 stylesheets/flint/functions/lib/_instance.scss
flint-gs-0.1.6 stylesheets/flint/functions/lib/_instance.scss
flint-gs-0.1.5 sass/flint/functions/lib/_instance.scss
flint-gs-0.1.4 sass/flint/functions/lib/_instance.scss
flint-gs-0.1.3 sass/flint/functions/lib/_instance.scss
flint-gs-0.1.2 sass/flint/functions/lib/_instance.scss