Avoid console
errors in browsers that lack a console.
Excerpted from HTML5 boilerplate:
/** | |
* Watermark background with CSS3 multiple-backgrounds, element() and linear-gradient() | |
*/ | |
h1 { | |
font:italic 4em Georgia,serif; | |
text-align:center; | |
padding: 1em 0 0; | |
margin:0 0 .3em; | |
} |
/* | |
* Equalise the height of boxes (uses min-height). | |
*/ | |
jQuery.fn.balanceHeights = function() { | |
// Get max height from list then apply to all. | |
var heights = []; | |
this.each( function () { | |
heights.push(jQuery(this).outerHeight()); | |
}); | |
return this.css('min-height', Math.max.apply({}, heights)); |
# | |
# Utilities for working with svgs | |
# | |
# svg2png - Create png file from source svg using inkscape | |
# svg2pngr - Create png file from source svg using inkscape recursively | |
# svgz - Create svgz file from source svg | |
# svgzr - Create svgz file from source svg recursively | |
# | |
Avoid console
errors in browsers that lack a console.
Excerpted from HTML5 boilerplate:
<?php | |
/* | |
theme_image() override. | |
*/ | |
function THEME_image($vars) | |
{ | |
// [Accessibility] Images must always have an alt attribute. | |
if (! isset($vars['alt'])) { | |
$vars['alt'] = ''; |
This is an adaptation of the Sass/Less comparison document.
Not a comprehensive overview of features of either library but a comparison of commonalities.
Sass | Crush
<?php | |
function named_args($required, $options = []) | |
{ | |
extract($options + [ | |
'option_one' => false, | |
'option_two' => true, | |
'option_three' => 100, | |
]); |