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

stylehacks

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylehacks - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

6

CHANGELOG.md

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

# 2.3.1
* Upgraded postcss-selector-parser to `v2.0.0`.
* Fixed an issue where stylehacks was not removing `*zoom: 1` from rules
generated by other PostCSS plugins.
# 2.3.0

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

35

dist/plugins/leadingStar.js

@@ -14,2 +14,3 @@ 'use strict';

var targets = ['ie 5.5', 'ie 6', 'ie 7'];
var hacks = '!_$_&_*_)_=_%_+_,_._/_`_]_#_~_?_:_|'.split('_');

@@ -21,10 +22,21 @@ exports.default = (0, _plugin2.default)(targets, ['decl', 'atrule'], function (node) {

var _ret = function () {
// some values are not picked up by before, so ensure they are
// at the beginning of the value
hacks.some(function (hack) {
if (!node.prop.indexOf(hack)) {
_this.push(node, {
identifier: 'property',
hack: node.prop
});
return true;
}
});
var before = node.raws.before;
if (!before) {
return {
v: undefined
v: void 0
};
}
var hacks = '!_$_&_*_)_=_%_+_,_._/_`_]_#_~_?_:_|'.split('_');
var hasBefore = hacks.some(function (hack) {
hacks.some(function (hack) {
if (~before.indexOf(hack)) {

@@ -38,22 +50,9 @@ _this.push(node, {

});
if (!hasBefore) {
// some values are not picked up by before, so ensure they are
// at the beginning of the value
hacks.some(function (hack) {
if (!node.prop.indexOf(hack)) {
_this.push(node, {
identifier: 'property',
hack: node.prop
});
return true;
}
});
}
}();
if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
}
if (node.type === 'atrule') {
} else if (node.type === 'atrule') {
// test for the @property: value; hack
var name = node.name;
var len = name.length - 1;

@@ -60,0 +59,0 @@ if (name.lastIndexOf(':') === len) {

{
"name": "stylehacks",
"version": "2.3.0",
"version": "2.3.1",
"description": "Detect/remove browser hacks from CSS files.",

@@ -17,3 +17,3 @@ "main": "dist/index.js",

"prepublish": "del-cli dist && BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/",
"test": "npm run prepublish && ava src/__tests__"
"test": "ava src/__tests__"
},

@@ -32,6 +32,6 @@ "keywords": [

"devDependencies": {
"ava": "^0.12.0",
"ava": "^0.14.0",
"babel-cli": "^6.5.1",
"babel-core": "^6.5.2",
"babel-plugin-add-module-exports": "^0.1.2",
"babel-plugin-add-module-exports": "^0.2.0",
"babel-preset-es2015": "^6.5.0",

@@ -59,3 +59,3 @@ "babel-preset-es2015-loose": "^7.0.0",

"postcss-reporter": "^1.3.3",
"postcss-selector-parser": "^1.3.2",
"postcss-selector-parser": "^2.0.0",
"read-file-stdin": "^0.2.1",

@@ -62,0 +62,0 @@ "text-table": "^0.2.0",

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