Sha256: c776214f6f0ca637ebafe49ca23b303fd4a3793af3ca9b82d15936d9997fe81f

Contents?: true

Size: 1.51 KB

Versions: 1

Compression:

Stored size: 1.51 KB

Contents

// Prints debug properties
// -------------------------------------------------------------------------------
// @dependence `flint-print-instance()`
// -------------------------------------------------------------------------------
// @param $calc-key [string] : breakpoint key to search for instance
// -------------------------------------------------------------------------------
// @output instance map

@mixin flint-debug-instance($calc-key) {
    @if flint-get-value("settings", "debug-mode") {
        // Lets clean up the selector a bit...
        $selector-string: selector_string();
        $selector-list: flint-string-to-list($selector-string);
        $selector-cleaned: flint-list-to-string($selector-list, " ");

		$printKey: "#{$selector-cleaned}" + "::" + "#{$calc-key}";
		@include flint-print-instance( map-get( $flint__instances, unquote($printKey) ) );
	}
}

// Prints all contents of instance
// -------------------------------------------------------------------------------
// @param $instance [map] : instance
// -------------------------------------------------------------------------------
// @output instance map

@mixin flint-print-instance($instance) {

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flint-gs-1.7.1 stylesheets/flint/mixins/lib/_print-instance.scss