css-blank-pseudo
Advanced tools
Comparing version 0.1.4 to 1.0.0
function cssBlankPseudo(e,t){var n=Object(t).className,r=Object(t).attr||"blank",o=Object(t).force;try{if(e.querySelector(":blank"),!o)return}catch(e){}var a,i,s,c=(e.ownerDocument||e).defaultView;d(c.HTMLInputElement),d(c.HTMLSelectElement),d(c.HTMLTextAreaElement),a=c.HTMLOptionElement,i=Object.getOwnPropertyDescriptor(a.prototype,"selected"),s=i.set,i.set=function(t){s.apply(this,arguments);var n=e.createEvent("Event");n.initEvent("change",!0,!0),this.dispatchEvent(n)},Object.defineProperty(a.prototype,"selected",i);var l=/^(INPUT|SELECT|TEXTAREA)$/;function p(){this.value||"SELECT"===this.nodeName&&this.options[this.selectedIndex].value?(r&&this.removeAttribute(r),n&&this.classList.remove(n),this.removeAttribute("blank")):(r&&this.setAttribute("blank",r),n&&this.classList.add(n))}function d(e){var t=Object.getOwnPropertyDescriptor(e.prototype,"value"),n=t.set;t.set=function(e){n.apply(this,arguments),p.apply(this)},Object.defineProperty(e.prototype,"value",t)}Array.prototype.forEach.call(e.querySelectorAll("INPUT,SELECT,TEXTAREA"),function(e){"SELECT"===e.nodeName?e.addEventListener("change",p):e.addEventListener("input",p),p.call(e)}),new MutationObserver(function(e){e.forEach(function(e){Array.prototype.forEach.call(e.addedNodes||[],function(e){1===e.nodeType&&l.test(e.nodeName)&&("SELECT"===e.nodeName?e.addEventListener("change",p):e.addEventListener("input",p),p.call(e))}),Array.prototype.forEach.call(e.removedNodes||[],function(e){1===e.nodeType&&l.test(e.nodeName)&&("SELECT"===e.nodeName?e.removeEventListener("change",p):e.removeEventListener("input",p))})})}).observe(e,{childList:!0,subtree:!0})} | ||
//# sourceMappingURL=browser-legacy.js.map |
function cssBlankPseudo(e,t){var r=Object(t).className,n=Object(t).attr||"blank",o=Object(t).force;try{if(e.querySelector(":blank"),!o)return}catch(e){}var a=(e.ownerDocument||e).defaultView;i(a.HTMLInputElement),i(a.HTMLSelectElement),i(a.HTMLTextAreaElement);var c="input,select,textarea";function s(){this.value?(n&&this.removeAttribute(n),r&&this.classList.remove(r),this.removeAttribute("blank")):(n&&this.setAttribute("blank",n),r&&this.classList.add(r))}function i(e){var t=Object.getOwnPropertyDescriptor(e.prototype,"value"),r=t.set;t.set=function(e){r.apply(this,arguments),s.apply(this)},Object.defineProperty(e.prototype,"value",t)}Array.prototype.forEach.call(e.querySelectorAll(c),function(e){e.addEventListener("input",s),s.call(e)}),new MutationObserver(function(e){e.forEach(function(e){e.addedNodes&&e.addedNodes.forEach(function(e){1===e.nodeType&&e.matches(c)&&(e.addEventListener("input",s),s.call(e))}),e.removedNodes&&e.removedNodes.forEach(function(e){1===e.nodeType&&e.matches(c)&&e.removeEventListener("input",s)})})}).observe(e,{childList:!0,subtree:!0})} | ||
//# sourceMappingURL=browser.js.map |
# Changes to CSS Blank Pseudo | ||
### 1.0.0 (June 10, 2019) | ||
- Updated: `postcss` to 7.0.16 (patch) | ||
- Updated: Node 8+ compatibility (major) | ||
### 0.1.4 (November 17, 2018) | ||
@@ -4,0 +9,0 @@ |
@@ -36,3 +36,3 @@ #!/usr/bin/env node | ||
const fileRegExp = /^[\w\/.]+$/; | ||
const fileRegExp = /^[\w/.]+$/; | ||
const argRegExp = /^--(\w+)=("|')?(.+)\2$/; | ||
@@ -130,1 +130,2 @@ const relaxedJsonPropRegExp = /(['"])?([a-z0-9A-Z_]+)(['"])?:/g; | ||
} | ||
//# sourceMappingURL=cli.js.map |
{ | ||
"name": "css-blank-pseudo", | ||
"version": "0.1.4", | ||
"version": "1.0.0", | ||
"description": "Style form elements when they are empty", | ||
@@ -34,35 +34,49 @@ "author": "Jonathan Neal <jonathantneal@hotmail.com>", | ||
"build": "npm run build:browser && npm run build:cli && npm run build:node && npm run build:postcss", | ||
"build:browser": "cross-env NODE_ENV=browser rollup -c .rollup.js --silent && cross-env NODE_ENV=browser:legacy rollup -c .rollup.js --silent", | ||
"build:cli": "cross-env NODE_ENV=cli rollup -c .rollup.js --silent", | ||
"build:postcss": "cross-env NODE_ENV=postcss rollup -c .rollup.js --silent", | ||
"build:node": "rollup -c .rollup.js --silent && cross-env NODE_ENV=legacy rollup -c .rollup.js --silent", | ||
"prepublishOnly": "npm run build && npm test", | ||
"pretest": "npm run build:postcss", | ||
"build:browser": "cross-env NODE_ENV=browser rollup --config .rollup.js --silent && cross-env NODE_ENV=browser:legacy rollup --config .rollup.js --silent", | ||
"build:cli": "cross-env NODE_ENV=cli rollup --config .rollup.js --silent", | ||
"build:postcss": "cross-env NODE_ENV=postcss rollup --config .rollup.js --silent", | ||
"build:node": "rollup --config .rollup.js --silent && cross-env NODE_ENV=legacy rollup --config .rollup.js --silent", | ||
"prepublishOnly": "npm test && npm run build", | ||
"pretest:postcss": "npm run build:postcss", | ||
"test": "npm run test:js && npm run test:postcss", | ||
"test:js": "eslint src/*.js --cache --ignore-path .gitignore --quiet", | ||
"test:postcss": "postcss-tape --plugin=postcss.js" | ||
"test:js": "eslint src/{*,**/*}.js --cache --ignore-path .gitignore --quiet", | ||
"test:postcss": "postcss-tape --plugin postcss.js" | ||
}, | ||
"engines": { | ||
"node": ">=6.0.0" | ||
"node": ">=8.0.0" | ||
}, | ||
"dependencies": { | ||
"postcss": "^7.0.5" | ||
"postcss": "^7.0.17" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.1.6", | ||
"@babel/preset-env": "^7.1.6", | ||
"@babel/core": "^7.4.5", | ||
"@babel/preset-env": "^7.4.5", | ||
"babel-eslint": "^10.0.1", | ||
"cross-env": "^5.2.0", | ||
"eslint": "^5.9.0", | ||
"eslint-config-dev": "2.0.0", | ||
"postcss-tape": "^2.2.0", | ||
"eslint": "^5.16.0", | ||
"postcss-tape": "^5.0.0", | ||
"pre-commit": "^1.2.2", | ||
"rollup": "^0.67.3", | ||
"rollup-plugin-babel": "^4.0.3", | ||
"rollup-plugin-terser": "^3.0.0" | ||
"rollup": "^1.14.6", | ||
"rollup-plugin-babel": "^4.3.2", | ||
"rollup-plugin-terser": "^5.0.0" | ||
}, | ||
"eslintConfig": { | ||
"extends": "dev", | ||
"parser": "babel-eslint" | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"parser": "babel-eslint", | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"impliedStrict": true, | ||
"sourceType": "module" | ||
}, | ||
"root": true, | ||
"rules": { | ||
"no-console": [ | ||
0 | ||
] | ||
} | ||
}, | ||
@@ -69,0 +83,0 @@ "keywords": [ |
@@ -5,6 +5,6 @@ 'use strict'; | ||
var postcss = _interopDefault(require('postcss')); | ||
var postcss$1 = _interopDefault(require('postcss')); | ||
const selectorRegExp = /:blank([^\w-]|$)/gi; | ||
var postcss$1 = postcss.plugin('css-blank-pseudo', opts => { | ||
var postcss = postcss$1.plugin('css-blank-pseudo', opts => { | ||
const replaceWith = String(Object(opts).replaceWith || '[blank]'); | ||
@@ -30,3 +30,3 @@ const preserve = Boolean('preserve' in Object(opts) ? opts.preserve : true); | ||
module.exports = postcss$1; | ||
module.exports = postcss; | ||
//# sourceMappingURL=postcss.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
64481
10
522
0
Updatedpostcss@^7.0.17