stylecow-plugin-msfilter-background-alpha
Advanced tools
Comparing version 3.0.0 to 4.0.0
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12647
9
396
1
1