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

postcss-color-function

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-color-function - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# 3.0.0 - 2017-02-01
- Changed: send postcss warning when color function cannot be parsed instead of throwing
([#35](https://github.com/postcss/postcss-color-function/pull/35) - @drewbourne)
- Changed: send a postcss message when color function contains a var()
([#36](https://github.com/postcss/postcss-color-function/pull/36) - @drewbourne)

# 2.0.1 - 2016-03-15

@@ -2,0 +9,0 @@

28

index.js

@@ -13,3 +13,3 @@ /**

module.exports = postcss.plugin("postcss-color-function", function() {
return function(style) {
return function(style, result) {
style.walkDecls(function transformDecl(decl) {

@@ -20,5 +20,25 @@ if (!decl.value || decl.value.indexOf("color(") === -1) {

decl.value = helpers.try(function transformColorValue() {
return transformColor(decl.value)
}, decl.source)
if (decl.value.indexOf("var(") !== -1) {
result.messages.push({
plugin: "postcss-color-function",
type: "skipped-color-function-with-custom-property",
word: decl.value,
message:
"Skipped color function with custom property `" +
decl.value +
"`"
})
return
}
try {
decl.value = helpers.try(function transformColorValue() {
return transformColor(decl.value)
}, decl.source)
} catch (error) {
decl.warn(result, error.message, {
word: decl.value,
index: decl.index,
})
}
})

@@ -25,0 +45,0 @@ }

2

package.json
{
"name": "postcss-color-function",
"version": "2.0.1",
"version": "3.0.0",
"description": "PostCSS plugin to transform W3C CSS color function to more compatible CSS.",

@@ -5,0 +5,0 @@ "keywords": [

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