Socket
Socket
Sign inDemoInstall

cssstyle

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cssstyle - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

14

lib/allProperties.js
'use strict';
// autogenerated - 1/20/2020
// autogenerated - 4/29/2020

@@ -261,3 +261,2 @@ /*

'margin-top',
'margin-trim',
'marker-side',

@@ -349,2 +348,5 @@ 'mask',

'resize',
'rest',
'rest-after',
'rest-before',
'richness',

@@ -391,2 +393,3 @@ 'right',

'speak',
'speak-as',
'speak-header',

@@ -437,3 +440,10 @@ 'speak-numeral',

'visibility',
'voice-balance',
'voice-duration',
'voice-family',
'voice-pitch',
'voice-range',
'voice-rate',
'voice-stress',
'voice-volume',
'volume',

@@ -440,0 +450,0 @@ 'white-space',

@@ -550,2 +550,8 @@ 'use strict';

});
test('supports calc', () => {
const style = new CSSStyleDeclaration();
style.setProperty('width', 'calc(100% - 100px)');
expect(style.getPropertyValue('width')).toEqual('calc(100% - 100px)');
});
});

2

lib/implementedProperties.js
'use strict';
// autogenerated - 1/23/2020
// autogenerated - 4/29/2020

@@ -5,0 +5,0 @@ /*

@@ -21,2 +21,3 @@ /*********************************************************************

NULL_OR_EMPTY_STR: 10,
CALC: 11,
};

@@ -34,2 +35,3 @@

var colorRegEx3 = /^rgba\(([^)]*)\)$/;
var calcRegEx = /^calc\(([^)]*)\)$/;
var colorRegEx4 = /^hsla?\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*(,\s*(-?\d+|-?\d*.\d+)\s*)?\)/;

@@ -66,2 +68,5 @@ var angleRegEx = /^([-+]?[0-9]*\.?[0-9]+)(deg|grad|rad)$/;

}
if (calcRegEx.test(val)) {
return exports.TYPES.CALC;
}
if (stringRegEx.test(val)) {

@@ -76,2 +81,3 @@ return exports.TYPES.STRING;

}
var res = colorRegEx2.exec(val);

@@ -208,2 +214,7 @@ var parts;

exports.parseMeasurement = function parseMeasurement(val) {
var type = exports.valueType(val);
if (type === exports.TYPES.CALC) {
return val;
}
var length = exports.parseLength(val);

@@ -210,0 +221,0 @@ if (length !== undefined) {

@@ -68,2 +68,9 @@ 'use strict';

});
it('returns calc from calc(100px * 2)', () => {
let input = 'calc(100px * 2)';
let output = parsers.valueType(input);
expect(output).toEqual(parsers.TYPES.CALC);
});
});

@@ -70,0 +77,0 @@ describe('parseInteger', () => {

'use strict';
// autogenerated - 1/23/2020
// autogenerated - 4/29/2020

@@ -5,0 +5,0 @@ /*

@@ -9,3 +9,3 @@ {

],
"version": "2.2.0",
"version": "2.3.0",
"homepage": "https://github.com/jsdom/cssstyle",

@@ -12,0 +12,0 @@ "maintainers": [

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