Skip to content

Instantly share code, notes, and snippets.

View m-coding's full-sized avatar

michelle m-coding

View GitHub Profile
@m-coding
m-coding / css-supports.js
Created May 28, 2016 04:21 — forked from codler/css-supports.js
CSS.supports() Polyfill
/*! CSS.supports() Polyfill
* https://gist.github.com/codler/03a0995195aa2859465f
* Copyright (c) 2014 Han Lin Yap http://yap.nu; MIT license */
if (!('CSS' in window)) {
window.CSS = {};
}
if (!('supports' in window.CSS)) {
window.CSS._cacheSupports = {};
window.CSS.supports = function(propertyName, value) {
animation: rock 4.5s infinite;
@keyframes rock {
from {
transform: rotate(0deg) translate(50px,0);
animation-timing-function: ease-in-out;
}
50% {
transform: rotate(0) translate(-150px,0);
animation-timing-function: ease-in-out;