Sha256: 643687a722b3161510a844ca53d2923e988a9587a908770f191f2f3d0e1af790

Contents?: true

Size: 1.31 KB

Versions: 9

Compression:

Stored size: 1.31 KB

Contents

// Prints debug output into compiled stylesheet as flagged comments
// -------------------------------------------------------------------------------
// @dependence `printInstance()`
// -------------------------------------------------------------------------------
// @param $calcKey [Breakpoint] : breakpoint key to search for instance
// -------------------------------------------------------------------------------
// @output [Styles...]

@mixin debugPrintInstance($calcKey) {
	@if get-value(settings, debug-mode) == true {
		$printKey: "#{selector_string()}" + "::" + "#{$calcKey}";
		@include printInstance( map-get( $flint__instances, unquote($printKey) ) );
	}
}

// Prints all contents of instance as flagged comments
// -------------------------------------------------------------------------------
// @param $instance [Map] : instance
// -------------------------------------------------------------------------------
// @output [Styles...]

@mixin printInstance($instance) {

	// Loop through each property in passed instance
	@each $property, $value in $instance {

		// Check if value is output map
		@if is_map($value) {
			@each $mod_property, $mod_value in $value {
				-flint--output-#{$mod_property}: #{$mod_value};
			}
		// Else, print values as flagged comments
		} @else {
			-flint-#{$property}: #{$value};
		}
	}
}

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
flint-gs-1.0.2 stylesheets/flint/mixins/lib/_print-instance.scss
flint-gs-1.0.1 stylesheets/flint/mixins/lib/_print-instance.scss
flint-gs-1.0.0 stylesheets/flint/mixins/lib/_print-instance.scss
flint-gs-0.1.7 stylesheets/flint/mixins/lib/_print-instance.scss
flint-gs-0.1.6 stylesheets/flint/mixins/lib/_print-instance.scss
flint-gs-0.1.5 sass/flint/mixins/lib/_print-instance.scss
flint-gs-0.1.4 sass/flint/mixins/lib/_print-instance.scss
flint-gs-0.1.3 sass/flint/mixins/lib/_print-instance.scss
flint-gs-0.1.2 sass/flint/mixins/lib/_print-instance.scss