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

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.1.0 to 2.2.0

5

lib/CSSStyleDeclaration.js

@@ -59,2 +59,7 @@ /*********************************************************************

}
var isCustomProperty = name.indexOf('--') === 0;
if (isCustomProperty) {
this._setProperty(name, value, priority);
return;
}
var lowercaseName = name.toLowerCase();

@@ -61,0 +66,0 @@ if (!allProperties.has(lowercaseName) && !allExtraProperties.has(lowercaseName)) {

@@ -521,2 +521,31 @@ 'use strict';

});
test('getPropertyValue for custom properties in cssText', () => {
const style = new CSSStyleDeclaration();
style.cssText = '--foo: red';
expect(style.getPropertyValue('--foo')).toEqual('red');
});
test('getPropertyValue for custom properties with setProperty', () => {
const style = new CSSStyleDeclaration();
style.setProperty('--bar', 'blue');
expect(style.getPropertyValue('--bar')).toEqual('blue');
});
test('getPropertyValue for custom properties with object setter', () => {
const style = new CSSStyleDeclaration();
style['--baz'] = 'yellow';
expect(style.getPropertyValue('--baz')).toEqual('');
});
test('custom properties are case-sensitive', () => {
const style = new CSSStyleDeclaration();
style.cssText = '--fOo: purple';
expect(style.getPropertyValue('--foo')).toEqual('');
expect(style.getPropertyValue('--fOo')).toEqual('purple');
});
});

2

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

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

'use strict';
// autogenerated - 1/20/2020
// autogenerated - 1/23/2020

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

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

],
"version": "2.1.0",
"version": "2.2.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