A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
/** | |
* | |
* Grunt build task with force options via stackoverflow | |
* | |
*/ | |
module.exports = function(grunt) { | |
const previous_force_state = grunt.option('force'); |
a, abbr, acronym, address, applet, area, article, aside, audio, b, base, | |
basefont, bdi, bdo, bgsound, big, blink, blockquote, body, br, button, canvas, | |
caption, center, cite, code, col, colgroup, content, data, datalist, dd, del, | |
details, dfn, dir, div, dl, dt, em, embed, fieldset, figcaption, figure, font, | |
footer, form, frame, frameset, h1, h2, h3, h4, h5, h6, head, header, hgroup, hr, | |
html, i, iframe, img, input, ins, isindex, kbd, keygen, label, legend, li, link, | |
listing, main, map, mark, marquee, menu, menuitem, meta, meter, nav, nobr, | |
noframes, noscript, object, ol, optgroup, option, output, p, param, plaintext, | |
pre, progress, q, rp, rt, ruby, s, samp, script, section, select, shadow, small, | |
source, spacer, span, strike, strong, style, sub, summary, sup, table, tbody, |
// Plus Minus Animation | |
// will not function in IE11 http://caniuse.com/#search=flex | |
// ========================================================================= */ | |
@mixin plus-minus { | |
@include flexbox(); | |
@include align-items(center); | |
@include justify-content(center); | |
&:before, | |
&:after { |
'use strict'; | |
var PRJ = window.PRJ || {}; | |
PRJ.printOnReload = { | |
init: function () { | |
window.print(); | |
} | |
}; |
// Create height spacer classes | |
// ========================================================================= */ | |
$class-slug: cwt-gen !default; | |
@for $i from 0 through 50 { | |
.#{$class-slug}-#{$i} { | |
height: (1pt - 2) + $i; | |
} | |
} |
// SVG Grunt Workflow | |
// https://www.npmjs.com/package/grunt-svg-sprite | |
// ./config/svg_sprite.js | |
'use strict'; | |
module.exports = function(grunt) { | |
grunt.config.set('svg_sprite', { | |
sprites: { | |
expand: true, |
'use strict'; | |
var §projectName§ = window.§projectName§ || {}; | |
§projectName§.msieversion = { | |
init: function() { | |
var ua = window.navigator.userAgent; | |
var msie = ua.indexOf('MSIE '); |
// FF+ Scss styles go here | |
@-moz-document url-prefix() { | |
body::before { | |
@include border-radius(3px); | |
content: 'According to the media query hack this is FF+'; | |
display: block; | |
padding: 10px; | |
position: absolute; | |
top: 10px; |