Skip to content

Instantly share code, notes, and snippets.

View rvetere's full-sized avatar
:octocat:
Missing github so badly in my daily work...

Remo Vetere rvetere

:octocat:
Missing github so badly in my daily work...
View GitHub Profile
@rvetere
rvetere / gradient.js
Created October 27, 2016 08:21
an attempt for a dynamic gradient-mixin with "postcss-mixins"
// @flow
/*
background: -moz-linear-gradient(left, $(colorA) $(stopA), $(colorB) $(stopB));
background: -webkit-linear-gradient(left, $(colorA) $(stopA), $(colorB) $(stopB));
background: linear-gradient(to right, $(colorA) $(stopA), $(colorB) $(stopB));
*/
const isColor: Function = (value: string): boolean => (
value.indexOf('#') > -1 || value.indexOf('rgb') > -1