Socket
Socket
Sign inDemoInstall

stylecow-plugin-msfilter-background-alpha

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylecow-plugin-msfilter-background-alpha - npm Package Compare versions

Comparing version 3.0.0 to 4.0.0

tests/cases.js

7

index.js

@@ -14,3 +14,3 @@ var color = require('stylecow-color');

fn: function (declaration) {
var fn = declaration.searchFirst({
var fn = declaration.get({
type: 'Function',

@@ -24,9 +24,8 @@ name: ['rgba', 'hsla']

if (rgba[3] === 1) {
return fn.replaceWith(stylecow.Keyword.createFromString('#' + color.RGBA_HEX(rgba)));
return fn.replaceWith(stylecow.parse('#' + color.RGBA_HEX(rgba), 'Hex'));
}
var hex = '#' + Math.round(255 * rgba[3]).toString(16) + color.RGBA_HEX(rgba);
var filter = 'progid:DXImageTransform.Microsoft.gradient(startColorStr="' + hex + '", endColorStr="' + hex + '")';
stylecow.utils.addMsFilter(declaration.parent('Block'), filter);
stylecow.utils.addMsFilter(declaration.getParent('Block'), 'progid:DXImageTransform.Microsoft.gradient(startColorStr="' + hex + '", endColorStr="' + hex + '")');
}

@@ -33,0 +32,0 @@ }

{
"name": "stylecow-plugin-msfilter-background-alpha",
"description": "Stylecow plugin to add ms filters emulating the rgba/hsla colors in backgrounds in explorer < 9 using ms filters.",
"version": "3.0.0",
"version": "4.0.0",
"author": "Oscar Otero <oom@oscarotero.com>",

@@ -16,3 +16,9 @@ "homepage": "https://github.com/stylecow/stylecow-plugin-msfilter-background-alpha",

},
"devDependencies": {
"stylecow": "6.*"
},
"scripts": {
"test": "mocha tests/cases.js"
},
"license": "MIT"
}

Sorry, the diff of this file is not supported yet

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