Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

filter-gradient

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filter-gradient

Generate filter gradients for the old IE.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
360
decreased by-11.98%
Maintainers
1
Weekly downloads
 
Created
Source

filter-gradient

Generate filter gradients for the old IE

Build Status

Install

npm install filter-gradient --save

Usage

var filterGradient = require('filter-gradient');
var gradient = filterGradient('#7abcff', '#4096ee'/*, 0 or 1*/);

console.log(gradient);
// progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff7abcff', endColorstr='#ff4096ee', GradientType=0)

API

filterGradient(startColor, endColor?, gradientType?);

startColor

Type: string

The start color. Any CSS color formats, like blue, rgb(), rgba(), #RRGGBBAA, hsl()

endColor

Type string

The end color. Like startColor, but it's optional. If you omit this, it will use the startColor, it will be useful if you want generate rgba() fallback for old IE.

gradientType

Type number

0 or 1. 0 is vertical gradient, 1 is horizontal gradient, default value is 0;

CHANGELOG

2015-12-20

  • Make the filter string more regular
  • Change color string lower case

2015-11-11

  • First release.

LICENSE

MIT

Keywords

FAQs

Package last updated on 20 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc