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

postcss-button

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-button - npm Package Compare versions

Comparing version 0.3.15 to 0.3.16

38

CHANGELOG.md
# Changelog
#### 0.3.9
## 0.3.9
* feat: option to add classes and pseudo elements to the parent in the selector chain. Now work even whothout a parent in the selector chain. See updated test 08.
- feat: option to add classes and pseudo elements to the parent in the selector chain. Now work even without a parent in the selector chain. See updated test 08.
#### 0.3.0
## 0.3.0
* feat: make it optional to apply classes and pseudo elements to the parent in the selector chain. Option: `button-class-parent: true`. Default to false. See test 08.
* fix: improved documentation
- feat: make it optional to apply classes and pseudo elements to the parent in the selector chain. Option: `button-class-parent: true`. Default to false. See test 08.
- fix: improved documentation
#### 0.2.7
## 0.2.7
* feat: if there is a selector chain, the active, hover and disabled pseudo classes are applied to the first element in the chain. See test 07.
- feat: if there is a selector chain, the active, hover and disabled pseudo classes are applied to the first element in the chain. See test 07.
#### 0.2.5
## 0.2.5
* fix: refactor.
- fix: refactor.
#### 0.2.3
## 0.2.3
* fix: bug that modify default settings.
- fix: bug that modify default settings.
#### 0.2.0
## 0.2.0
* feat: option to use shorthand form inside atrules, and longhand form inside rules.
- feat: option to use shorthand form inside atRules, and longhand form inside rules.
#### 0.1.11
## 0.1.11
* fix: revert to display: inline-block
- fix: revert to display: inline-block
#### 0.1.7
## 0.1.7
* fix: add "padding: 0;"
- fix: add "padding: 0;"
#### 0.1.0
## 0.1.0
* mvp
- mvp
"use strict";
const postcss = require('postcss');
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _postcss = _interopRequireDefault(require("postcss"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const selectorApply = (selector, modifiers, applyToParent, isClass) => {

@@ -16,3 +23,4 @@ const apply = (sel, modifier) => {

const ruleDisabled = (ruleSelectors, options) => {
const rule = postcss.rule();
const rule = _postcss.default.rule();
rule.selectors = ruleSelectors.map(selector => {

@@ -47,3 +55,4 @@ const selectorDefault = selectorApply(selector, [':disabled', ':disabled:active', ':disabled:hover'], options.classParent);

const ruleHover = (ruleSelectors, options) => {
const rule = postcss.rule();
const rule = _postcss.default.rule();
rule.selectors = ruleSelectors.map(selector => {

@@ -80,3 +89,4 @@ const selectorDefault = selectorApply(selector, ':hover', options.classParent);

const ruleActive = (ruleSelectors, options) => {
const rule = postcss.rule();
const rule = _postcss.default.rule();
rule.selectors = ruleSelectors.map(selector => {

@@ -113,24 +123,24 @@ const selectorDefault = selectorApply(selector, ':active', options.classParent);

const declDefault = options => {
const d1 = [postcss.decl({
const d1 = [_postcss.default.decl({
prop: 'cursor',
value: 'pointer'
}), postcss.decl({
}), _postcss.default.decl({
prop: 'text-decoration',
value: 'none'
}), postcss.decl({
}), _postcss.default.decl({
prop: 'border',
value: 'none'
}), postcss.decl({
}), _postcss.default.decl({
prop: 'display',
value: 'inline-block'
})];
const d2 = options.color ? postcss.decl({
const d2 = options.color ? _postcss.default.decl({
prop: 'color',
value: options.color
}) : '';
const d3 = options.backgroundColor ? postcss.decl({
const d3 = options.backgroundColor ? _postcss.default.decl({
prop: 'background-color',
value: options.backgroundColor
}) : '';
const d4 = options.borderWidth && options.borderWidth !== '0' ? [postcss.decl({
const d4 = options.borderWidth && options.borderWidth !== '0' ? [_postcss.default.decl({
prop: 'box-shadow',

@@ -157,2 +167,3 @@ value: `inset 0 0 0 ${options.borderWidth} ${options.borderColor}`

module.exports = button;
var _default = button;
exports.default = _default;
"use strict";
const postcss = require('postcss');
var _postcss = _interopRequireDefault(require("postcss"));
const button = require('./button');
var _button = _interopRequireDefault(require("./button"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const propOption = (decl, optionsCurrent) => {

@@ -94,3 +96,3 @@ const option = {};

const postcssButton = postcss.plugin('postcss-button', opts => {
const postcssButton = _postcss.default.plugin('postcss-button', opts => {
const options = {

@@ -116,3 +118,3 @@ default: {

if (options.tmp && !node.next()) {
button(node.parent, options.tmp);
(0, _button.default)(node.parent, options.tmp);
delete options.tmp;

@@ -143,2 +145,3 @@ }

});
module.exports = postcssButton;
{
"name": "postcss-button",
"version": "0.3.15",
"version": "0.3.16",
"description": "A PostCSS plugin to create buttons.",

@@ -22,5 +22,3 @@ "keywords": [

"homepage": "http://francoisromain.github.io/postcss-button/",
"dependencies": {
"postcss": "^6.0.22"
},
"main": "./lib/index.js",
"scripts": {

@@ -30,14 +28,16 @@ "build": "babel src --out-dir lib",

},
"main": "./lib/index.js",
"dependencies": {
"postcss": "^7.0.2"
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.47",
"@babel/core": "^7.0.0-beta.47",
"@babel/preset-env": "^7.0.0-beta.47",
"@babel/register": "^7.0.0-beta.47",
"@babel/cli": "^7.0.0-beta.56",
"@babel/core": "^7.0.0-beta.56",
"@babel/preset-env": "^7.0.0-beta.56",
"@babel/register": "^7.0.0-beta.56",
"ava": "^1.0.0-beta.4",
"eslint": "^4.19.1",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.8.2"
"eslint": "^5.3.0",
"eslint-config-airbnb": "^17.0.0",
"eslint-plugin-import": "^2.13.0",
"eslint-plugin-jsx-a11y": "^6.1.1",
"eslint-plugin-react": "^7.10.0"
},

@@ -44,0 +44,0 @@ "eslintConfig": {

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