Skip to content

Instantly share code, notes, and snippets.

@idmontie
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save idmontie/0235a40de52f071f00c6 to your computer and use it in GitHub Desktop.
Save idmontie/0235a40de52f071f00c6 to your computer and use it in GitHub Desktop.
Small wrapper for CSS Console Logs
window.ConsoleCss = {
log : function ( obj, css ) {
var cssString = css;
if ( typeof css == 'object' ) {
cssString = '';
for ( var part in css ) {
if ( css.hasOwnProperty( part ) ) {
cssString += part + ':' + css[part] + '; ';
}
}
}
console.log( '%c' + obj, cssString );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment