Created
October 17, 2013 18:50
-
-
Save piouPiouM/7030210 to your computer and use it in GitHub Desktop.
My version of @hugogiraudel‘s http://codepen.io/HugoGiraudel/pen/unyBH with a shell output.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sass -t expanded test01.scss | |
test01.scss:10 DEBUG: list of 3 values: | |
test01.scss:14 DEBUG: - (string) a | |
test01.scss:14 DEBUG: - (color) #bada55 | |
test01.scss:14 DEBUG: - (number) 42 | |
test01.scss:10 DEBUG: list of 2 values: | |
test01.scss:14 DEBUG: - (bool) false | |
test01.scss:14 DEBUG: - (string) yummy | |
test01.scss:14 DEBUG: (number) 14px | |
test01.scss:14 DEBUG: (string) gloubiboulga |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @private | |
@function ppm_debug($prefix, $vars...) { | |
$result: ''; | |
@each $item in $vars { | |
$type: type-of($item); | |
@if 'list' == $type { | |
@debug 'list of #{length($item)} values:'; | |
$result: ppm_debug(' - ', $item...); | |
} | |
@else { | |
@debug '#{$prefix}(#{$type}) #{$item}'; | |
} | |
} | |
@return ""; | |
} | |
// Display clean debug | |
@mixin ppm_debug($vars...) { | |
$result: ppm_debug('', $vars...); | |
} | |
.page { | |
@include ppm_debug(a #BADA55 42, false yummy, 14px, "gloubiboulga"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment