Added image support for this Isometric Builder by Nicolas Gryman.
This pen is using the obelisk.js library.
Added image support for this Isometric Builder by Nicolas Gryman.
This pen is using the obelisk.js library.
// Check for SVG support | |
function supportSVG(){ | |
return ( !! document.createElementNS && !! document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect ) | |
} | |
// Does it support SVG as image source? | |
function supportSVGimages(){ | |
return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image", "1.1"); | |
} |
/* | |
* CENTERING ELEMENTS USING CSS | |
* <div class="container"><div class="box"></div></div> | |
*/ | |
/* HORIZONTAL CENTERING USING TEXT ALIGN */ | |
.container{ | |
text-align: center; | |
} |
@echo off | |
for %%F in (%*) do uglifyjs %%~dpnF%%~xF -o %%~dpnF.min%%~xF | |
exit |
<dict> | |
<key>name</key> | |
<string>JSHintify</string> | |
<key>scope</key> | |
<string>jshintify.error</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#555555</string> | |
</dict> |
<snippet> | |
<content><![CDATA[ | |
FB.api( "${1:/me}", function(response){ | |
if (response && !response.error) { | |
${2://do something with response here...} | |
} | |
}); | |
]]></content> | |
<tabTrigger>FB.api</tabTrigger> | |
</snippet> |
/** | |
* Cross Browser CSS3 Transition Event Handler | |
* Source: http://stackoverflow.com/questions/5023514/how-do-i-normalize-css3-transition-functions-across-browsers | |
* @return String : TransitionEnd Event Name | |
*/ | |
function transitionEndEventName () { | |
var i; | |
var el = document.createElement('div'); | |
var transitions = { | |
'transition':'transitionend', |
/* #1 A SIMPLE WAY */ | |
/* SOURCE: http://radiatingstar.com/css-keyframes-animations-with-less */ | |
@-webkit-keyframes some-animation {.mixi-frames;} | |
@-moz-keyframes some-animation {.mixi-frames;} | |
@-ms-keyframes some-animation {.mixi-frames;} | |
@-o-keyframes some-animation {.mixi-frames;} | |
@keyframes some-animation {.mixi-frames;} | |
.mixi-frames () { |
date "+DATE: %d/%m/%y TIME: %H:%M"; |
### NOTICE: Node.JS and UglifyJS must be installed (https://www.npmjs.com/package/uglify-js) | |
function jsmin { | |
if [ ! $1 ]; then | |
echo "Usage: $0 somefile.js"; | |
return; | |
fi | |
filename=$(basename $1) |