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.0.3 to 4.1.0

7

CHANGELOG.md

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

## 4.1.0 (October 27, 2020)
- Bumped [CSSTree](https://github.com/csstree/csstree) to `^1.0.0`
- Fixed wrongly merging of TRBL values when one of them contains `var()` (#420)
- Fixed wrongly merging of pseudo class and element with the same name, e.g. `:-ms-input-placeholder` and `::-ms-input-placeholder` (#383, #416)
- Fixed wrongly merging of `overflow` fallback (#415)
## 4.0.3 (March 24, 2020)

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

4

lib/replace/color.js

@@ -445,3 +445,3 @@ var lexer = require('css-tree').lexer;

item.data = {
type: 'HexColor',
type: 'Hash',
loc: node.loc,

@@ -469,3 +469,3 @@ value: toHex(args[0]) + toHex(args[1]) + toHex(args[2])

item.data = {
type: 'HexColor',
type: 'Hash',
loc: node.loc,

@@ -472,0 +472,0 @@ value: hex

@@ -11,3 +11,3 @@ var walk = require('css-tree').walk;

Url: require('./Url'),
HexColor: require('./color').compressHex,
Hash: require('./color').compressHex,
Identifier: require('./color').compressIdent,

@@ -14,0 +14,0 @@ Function: require('./color').compressFunction

@@ -5,3 +5,3 @@ var OMIT_PLUSSIGN = /^(?:\+|(-))?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/;

Dimension: true,
HexColor: true,
Hash: true,
Identifier: true,

@@ -8,0 +8,0 @@ Number: true,

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

case 'HexColor': // color
case 'Hash': // color
case 'Number':

@@ -125,2 +125,6 @@ case 'Percentage':

case 'Function':
if (child.name === 'var') {
return true;
}
special = child.name;

@@ -127,0 +131,0 @@ break;

@@ -17,14 +17,18 @@ var resolveProperty = require('css-tree').property;

var CURSOR_SAFE_VALUE = [
'auto', 'crosshair', 'default', 'move', 'text', 'wait', 'help',
'n-resize', 'e-resize', 's-resize', 'w-resize',
'ne-resize', 'nw-resize', 'se-resize', 'sw-resize',
'pointer', 'progress', 'not-allowed', 'no-drop', 'vertical-text', 'all-scroll',
'col-resize', 'row-resize'
];
var SAFE_VALUES = {
cursor: [
'auto', 'crosshair', 'default', 'move', 'text', 'wait', 'help',
'n-resize', 'e-resize', 's-resize', 'w-resize',
'ne-resize', 'nw-resize', 'se-resize', 'sw-resize',
'pointer', 'progress', 'not-allowed', 'no-drop', 'vertical-text', 'all-scroll',
'col-resize', 'row-resize'
],
overflow: [
'hidden', 'visible', 'scroll', 'auto'
],
position: [
'static', 'relative', 'absolute', 'fixed'
]
}
var POSITION_SAFE_VALUE = [
'static', 'relative', 'absolute', 'fixed'
];
var NEEDLESS_TABLE = {

@@ -109,10 +113,6 @@ 'border-width': ['border'],

if (realName === 'cursor') {
if (CURSOR_SAFE_VALUE.indexOf(name) === -1) {
if (SAFE_VALUES.hasOwnProperty(realName)) {
if (SAFE_VALUES[realName].indexOf(name) === -1) {
special[name] = true;
}
} else if (realName === 'position') {
if (POSITION_SAFE_VALUE.indexOf(name) === -1) {
special[name] = true;
}
} else if (DONT_MIX_VALUE.hasOwnProperty(realName)) {

@@ -119,0 +119,0 @@ if (DONT_MIX_VALUE[realName].test(name)) {

@@ -47,3 +47,3 @@ var generate = require('css-tree').generate;

if (!nonFreezePseudoClasses.hasOwnProperty(name)) {
pseudos[name] = true;
pseudos[':' + name] = true;
hasPseudo = true;

@@ -57,3 +57,3 @@ }

if (!nonFreezePseudoElements.hasOwnProperty(name)) {
pseudos[name] = true;
pseudos['::' + name] = true;
hasPseudo = true;

@@ -60,0 +60,0 @@ }

{
"name": "csso",
"version": "4.0.3",
"version": "4.1.0",
"description": "CSS minifier with structural optimisations",

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

"dependencies": {
"css-tree": "1.0.0-alpha.39"
"css-tree": "^1.0.0"
},

@@ -46,0 +46,0 @@ "devDependencies": {

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