Socket
Socket
Sign inDemoInstall

csso

Package Overview
Dependencies
3
Maintainers
3
Versions
82
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.1 to 4.2.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 4.2.0 (November 26, 2020)
- Trim Custom Property values when possible (#393)
- Fixed removing unit for zero-length dimentions in `min()`, `max()` and `clamp()` functions (#426)
- Fixed crash on bad value in TRBL declaration value (#412)
## 4.1.1 (November 15, 2020)

@@ -2,0 +8,0 @@

@@ -0,5 +1,14 @@

var property = require('css-tree').property;
module.exports = function cleanDeclartion(node, item, list) {
if (node.value.children && node.value.children.isEmpty()) {
list.remove(item);
return;
}
if (property(node.property).custom) {
if (/\S/.test(node.value.value)) {
node.value.value = node.value.value.trim();
}
}
};

8

lib/replace/Dimension.js
var packNumber = require('./Number').pack;
var MATH_FUNCTIONS = {
'calc': true,
'min': true,
'max': true,
'clamp': true
};
var LENGTH_UNIT = {

@@ -46,3 +52,3 @@ // absolute length units

// issue #222: don't remove units inside calc
if (this.function && this.function.name === 'calc') {
if (this.function && MATH_FUNCTIONS.hasOwnProperty(this.function.name)) {
return;

@@ -49,0 +55,0 @@ }

2

lib/restructure/4-restructShorthand.js

@@ -81,3 +81,3 @@ var List = require('css-tree').List;

var iehack = '';
var hasBadValues = declaration.value.children.some(function(child) {
var hasBadValues = declaration.value.type !== 'Value' || declaration.value.children.some(function(child) {
var special = false;

@@ -84,0 +84,0 @@

{
"name": "csso",
"version": "4.1.1",
"version": "4.2.0",
"description": "CSS minifier with structural optimisations",

@@ -41,3 +41,3 @@ "homepage": "https://github.com/css/csso",

"dependencies": {
"css-tree": "^1.0.0"
"css-tree": "^1.1.2"
},

@@ -44,0 +44,0 @@ "browser": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc