New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cssom-papandreou

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cssom-papandreou - npm Package Compare versions

Comparing version 0.2.4-patch5 to 0.2.4-patch6

lib/CSSDocumentRule.js

33

lib/parse.js

@@ -12,3 +12,4 @@ //.CommonJS

CSSKeyframeRule: require('./CSSKeyframeRule').CSSKeyframeRule,
CSSKeyframesRule: require('./CSSKeyframesRule').CSSKeyframesRule
CSSKeyframesRule: require('./CSSKeyframesRule').CSSKeyframesRule,
CSSDocumentRule: require('./CSSDocumentRule').CSSDocumentRule
};

@@ -45,3 +46,4 @@ ///CommonJS

"importRule": true,
"atBlock": true
"atBlock": true,
'documentRule-begin': true
};

@@ -51,9 +53,9 @@

// @type CSSStyleSheet|CSSMediaRule|CSSFontFaceRule|CSSKeyframesRule
// @type CSSStyleSheet|CSSMediaRule|CSSFontFaceRule|CSSKeyframesRule|CSSDocumentRule
var currentScope = styleSheet;
// @type CSSMediaRule|CSSKeyframesRule
// @type CSSMediaRule|CSSKeyframesRule|CSSDocumentRule
var parentRule;
var selector, name, value, priority="", styleRule, mediaRule, importRule, fontFaceRule, keyframesRule, keyframeRule, hostRule;
var selector, name, value, priority="", styleRule, mediaRule, importRule, fontFaceRule, keyframesRule, keyframeRule, hostRule, documentRule;

@@ -149,3 +151,10 @@ var atKeyframesRegExp = /@(-(?:\w+-)+)?keyframes/g;

case "@":
if (token.indexOf("@media", i) === i) {
if (token.indexOf("@-moz-document", i) === i) {
state = "documentRule-begin";
documentRule = new CSSOM.CSSDocumentRule;
documentRule.__starts = i;
i += "-moz-document".length;
buffer = "";
break;
} else if (token.indexOf("@media", i) === i) {
state = "atBlock";

@@ -234,2 +243,12 @@ mediaRule = new CSSOM.CSSMediaRule;

state = "before-name";
} else if (state === "documentRule-begin") {
// FIXME: what if this '{' is in the url text of the match function?
documentRule.matcher.matcherText = buffer.trim();
if (parentRule) {
documentRule.parentRule = parentRule;
}
currentScope = parentRule = documentRule;
documentRule.parentStyleSheet = styleSheet;
buffer = "";
state = "before-selector";
}

@@ -359,3 +378,3 @@ break;

case "selector":
// End of media rule.
// End of media/document rule.
if (!parentRule) {

@@ -362,0 +381,0 @@ parseError("Unexpected }");

@@ -10,3 +10,3 @@ {

],
"version": "0.2.4-patch5",
"version": "0.2.4-patch6",
"homepage": "https://github.com/NV/CSSOM",

@@ -13,0 +13,0 @@ "author": "Nikita Vasilyev <me@elv1s.ru>",

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