postcss-place
Advanced tools
Comparing version 2.0.0 to 3.0.0
@@ -1,3 +0,8 @@ | ||
# Changes to Place | ||
# Changes to PostCSS Place Properties | ||
### 3.0.0 (May 8, 2018) | ||
- Updated: `postcss-selector-parser` to v4.0.0 (major) | ||
- Updated: `postcss` to v6.0.22 (patch) | ||
### 2.0.0 (June 30, 2017) | ||
@@ -4,0 +9,0 @@ |
138
LICENSE.md
@@ -30,78 +30,80 @@ # CC0 1.0 Universal | ||
1. Copyright and Related Rights. A Work made available under CC0 may be | ||
protected by copyright and related or neighboring rights (“Copyright and | ||
Related Rights”). Copyright and Related Rights include, but are not limited | ||
to, the following: | ||
1. the right to reproduce, adapt, distribute, perform, display, | ||
communicate, and translate a Work; | ||
2. moral rights retained by the original author(s) and/or performer(s); | ||
3. publicity and privacy rights pertaining to a person’s image or likeness | ||
depicted in a Work; | ||
4. rights protecting against unfair competition in regards to a Work, | ||
subject to the limitations in paragraph 4(i), below; | ||
5. rights protecting the extraction, dissemination, use and reuse of data | ||
in a Work; | ||
6. database rights (such as those arising under Directive 96/9/EC of the | ||
European Parliament and of the Council of 11 March 1996 on the legal | ||
protection of databases, and under any national implementation thereof, | ||
including any amended or successor version of such directive); and | ||
7. other similar, equivalent or corresponding rights throughout the world | ||
based on applicable law or treaty, and any national implementations | ||
thereof. | ||
protected by copyright and related or neighboring rights (“Copyright and | ||
Related Rights”). Copyright and Related Rights include, but are not limited | ||
to, the following: | ||
1. the right to reproduce, adapt, distribute, perform, display, communicate, | ||
and translate a Work; | ||
2. moral rights retained by the original author(s) and/or performer(s); | ||
3. publicity and privacy rights pertaining to a person’s image or likeness | ||
depicted in a Work; | ||
4. rights protecting against unfair competition in regards to a Work, | ||
subject to the limitations in paragraph 4(i), below; | ||
5. rights protecting the extraction, dissemination, use and reuse of data in | ||
a Work; | ||
6. database rights (such as those arising under Directive 96/9/EC of the | ||
European Parliament and of the Council of 11 March 1996 on the legal | ||
protection of databases, and under any national implementation thereof, | ||
including any amended or successor version of such directive); and | ||
7. other similar, equivalent or corresponding rights throughout the world | ||
based on applicable law or treaty, and any national implementations | ||
thereof. | ||
2. Waiver. To the greatest extent permitted by, but not in contravention of, | ||
applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and | ||
unconditionally waives, abandons, and surrenders all of Affirmer’s Copyright | ||
and Related Rights and associated claims and causes of action, whether now | ||
known or unknown (including existing as well as future claims and causes of | ||
action), in the Work (i) in all territories worldwide, (ii) for the maximum | ||
duration provided by applicable law or treaty (including future time | ||
extensions), (iii) in any current or future medium and for any number of | ||
copies, and (iv) for any purpose whatsoever, including without limitation | ||
commercial, advertising or promotional purposes (the “Waiver”). Affirmer makes | ||
the Waiver for the benefit of each member of the public at large and to the | ||
detriment of Affirmer’s heirs and successors, fully intending that such Waiver | ||
shall not be subject to revocation, rescission, cancellation, termination, or | ||
any other legal or equitable action to disrupt the quiet enjoyment of the Work | ||
by the public as contemplated by Affirmer’s express Statement of Purpose. | ||
applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and | ||
unconditionally waives, abandons, and surrenders all of Affirmer’s Copyright | ||
and Related Rights and associated claims and causes of action, whether now | ||
known or unknown (including existing as well as future claims and causes of | ||
action), in the Work (i) in all territories worldwide, (ii) for the maximum | ||
duration provided by applicable law or treaty (including future time | ||
extensions), (iii) in any current or future medium and for any number of | ||
copies, and (iv) for any purpose whatsoever, including without limitation | ||
commercial, advertising or promotional purposes (the “Waiver”). Affirmer | ||
makes the Waiver for the benefit of each member of the public at large and | ||
to the detriment of Affirmer’s heirs and successors, fully intending that | ||
such Waiver shall not be subject to revocation, rescission, cancellation, | ||
termination, or any other legal or equitable action to disrupt the quiet | ||
enjoyment of the Work by the public as contemplated by Affirmer’s express | ||
Statement of Purpose. | ||
3. Public License Fallback. Should any part of the Waiver for any reason be | ||
judged legally invalid or ineffective under applicable law, then the Waiver | ||
shall be preserved to the maximum extent permitted taking into account | ||
Affirmer’s express Statement of Purpose. In addition, to the extent the Waiver | ||
is so judged Affirmer hereby grants to each affected person a royalty-free, non | ||
transferable, non sublicensable, non exclusive, irrevocable and unconditional | ||
license to exercise Affirmer’s Copyright and Related Rights in the Work (i) in | ||
all territories worldwide, (ii) for the maximum duration provided by applicable | ||
law or treaty (including future time extensions), (iii) in any current or | ||
future medium and for any number of copies, and (iv) for any purpose | ||
whatsoever, including without limitation commercial, advertising or promotional | ||
purposes (the “License”). The License shall be deemed effective as of the date | ||
CC0 was applied by Affirmer to the Work. Should any part of the License for any | ||
reason be judged legally invalid or ineffective under applicable law, such | ||
partial invalidity or ineffectiveness shall not invalidate the remainder of the | ||
License, and in such case Affirmer hereby affirms that he or she will not (i) | ||
exercise any of his or her remaining Copyright and Related Rights in the Work | ||
or (ii) assert any associated claims and causes of action with respect to the | ||
Work, in either case contrary to Affirmer’s express Statement of Purpose. | ||
judged legally invalid or ineffective under applicable law, then the Waiver | ||
shall be preserved to the maximum extent permitted taking into account | ||
Affirmer’s express Statement of Purpose. In addition, to the extent the | ||
Waiver is so judged Affirmer hereby grants to each affected person a | ||
royalty-free, non transferable, non sublicensable, non exclusive, | ||
irrevocable and unconditional license to exercise Affirmer’s Copyright and | ||
Related Rights in the Work (i) in all territories worldwide, (ii) for the | ||
maximum duration provided by applicable law or treaty (including future time | ||
extensions), (iii) in any current or future medium and for any number of | ||
copies, and (iv) for any purpose whatsoever, including without limitation | ||
commercial, advertising or promotional purposes (the “License”). The License | ||
shall be deemed effective as of the date CC0 was applied by Affirmer to the | ||
Work. Should any part of the License for any reason be judged legally | ||
invalid or ineffective under applicable law, such partial invalidity or | ||
ineffectiveness shall not invalidate the remainder of the License, and in | ||
such case Affirmer hereby affirms that he or she will not (i) exercise any | ||
of his or her remaining Copyright and Related Rights in the Work or (ii) | ||
assert any associated claims and causes of action with respect to the Work, | ||
in either case contrary to Affirmer’s express Statement of Purpose. | ||
4. Limitations and Disclaimers. | ||
1. No trademark or patent rights held by Affirmer are waived, abandoned, | ||
surrendered, licensed or otherwise affected by this document. | ||
2. Affirmer offers the Work as-is and makes no representations or | ||
warranties of any kind concerning the Work, express, implied, statutory | ||
or otherwise, including without limitation warranties of title, | ||
merchantability, fitness for a particular purpose, non infringement, or | ||
the absence of latent or other defects, accuracy, or the present or | ||
absence of errors, whether or not discoverable, all to the greatest | ||
extent permissible under applicable law. | ||
3. Affirmer disclaims responsibility for clearing rights of other persons | ||
that may apply to the Work or any use thereof, including without | ||
limitation any person’s Copyright and Related Rights in the Work. | ||
Further, Affirmer disclaims responsibility for obtaining any necessary | ||
consents, permissions or other rights required for any use of the Work. | ||
4. Affirmer understands and acknowledges that Creative Commons is not a | ||
party to this document and has no duty or obligation with respect to | ||
this CC0 or use of the Work. | ||
1. No trademark or patent rights held by Affirmer are waived, abandoned, | ||
surrendered, licensed or otherwise affected by this document. | ||
2. Affirmer offers the Work as-is and makes no representations or warranties | ||
of any kind concerning the Work, express, implied, statutory or | ||
otherwise, including without limitation warranties of title, | ||
merchantability, fitness for a particular purpose, non infringement, or | ||
the absence of latent or other defects, accuracy, or the present or | ||
absence of errors, whether or not discoverable, all to the greatest | ||
extent permissible under applicable law. | ||
3. Affirmer disclaims responsibility for clearing rights of other persons | ||
that may apply to the Work or any use thereof, including without | ||
limitation any person’s Copyright and Related Rights in the Work. | ||
Further, Affirmer disclaims responsibility for obtaining any necessary | ||
consents, permissions or other rights required for any use of the Work. | ||
4. Affirmer understands and acknowledges that Creative Commons is not a | ||
party to this document and has no duty or obligation with respect to this | ||
CC0 or use of the Work. | ||
For more information, please see | ||
http://creativecommons.org/publicdomain/zero/1.0/. |
{ | ||
"name": "postcss-place", | ||
"version": "2.0.0", | ||
"description": "`place-[alignment] shorthand for align-[alignment] and justify-[alignment]", | ||
"author": "Jonathan Neal <jonathantneal@hotmail.com> (http://jonathantneal.com)", | ||
"version": "3.0.0", | ||
"description": "Use a place-* shorthand for align-* and justify-* in CSS", | ||
"author": "Jonathan Neal <jonathantneal@hotmail.com>", | ||
"license": "CC0-1.0", | ||
@@ -10,40 +10,38 @@ "repository": "jonathantneal/postcss-place", | ||
"bugs": "https://github.com/jonathantneal/postcss-place/issues", | ||
"main": "index.js", | ||
"main": "index.cjs.js", | ||
"module": "index.es.js", | ||
"files": [ | ||
"index.js" | ||
"index.cjs.js", | ||
"index.es.js" | ||
], | ||
"scripts": { | ||
"lint": "echint && eslint index.js && jscs index.js", | ||
"prepublish": "npm test", | ||
"tape": "postcss-tape", | ||
"test": "npm run lint && postcss-tape" | ||
"prepublishOnly": "npm test", | ||
"pretest": "rollup -c .rollup.js --silent", | ||
"test": "echo 'Running tests...'; npm run test:js && npm run test:tape", | ||
"test:ec": "echint --ignore index.*.js test", | ||
"test:js": "eslint *.js --cache --ignore-path .gitignore --quiet", | ||
"test:tape": "postcss-tape" | ||
}, | ||
"engines": { | ||
"node": ">=6.9.1" | ||
"node": ">=4.0.0" | ||
}, | ||
"dependencies": { | ||
"postcss": "^6.0.4", | ||
"postcss": "^6.0.22", | ||
"postcss-value-parser": "^3.3.0" | ||
}, | ||
"devDependencies": { | ||
"echint": "^4.0.1", | ||
"echint-config-dev": "1.0.0", | ||
"eslint": "^4.1.1", | ||
"eslint-config-dev": "2.0.0", | ||
"jscs": "^3.0.7", | ||
"jscs-config-dev": "1.0.1", | ||
"postcss-tape": "2.0.1" | ||
"babel-core": "^6.26.3", | ||
"babel-eslint": "^8.2.3", | ||
"babel-preset-env": "^1.6.1", | ||
"eslint": "^4.19.1", | ||
"eslint-config-dev": "^2.0.0", | ||
"postcss-tape": "^2.2.0", | ||
"pre-commit": "^1.2.2", | ||
"rollup": "^0.58.2", | ||
"rollup-plugin-babel": "^3.0.4" | ||
}, | ||
"echint": { | ||
"extends": "dev" | ||
}, | ||
"eslintConfig": { | ||
"extends": "dev", | ||
"parserOptions": { | ||
"sourceType": "module" | ||
} | ||
"parser": "babel-eslint" | ||
}, | ||
"jscsConfig": { | ||
"preset": "dev" | ||
}, | ||
"keywords": [ | ||
@@ -50,0 +48,0 @@ "postcss", |
188
README.md
@@ -1,44 +0,36 @@ | ||
# Place <a href="https://github.com/postcss/postcss"><img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right"></a> | ||
# PostCSS Place Properties [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][postcss] | ||
[![NPM Version][npm-img]][npm-url] | ||
[![CSS Standard Status][css-img]][css-url] | ||
[![Build Status][cli-img]][cli-url] | ||
[![Licensing][lic-image]][lic-url] | ||
[![Changelog][log-image]][log-url] | ||
[![Gitter Chat][git-image]][git-url] | ||
[![Windows Build Status][win-img]][win-url] | ||
[![Support Chat][git-img]][git-url] | ||
[Place] lets you use `place-*` properties as shorthands for `align-*` and `justify-*` per the [CSS Box Alignment Module Level 3]. | ||
[PostCSS Place Properties] lets you use `place-*` properties as shorthands for `align-*` | ||
and `justify-*`, following the [CSS Box Alignment] specification. | ||
```css | ||
/* before */ | ||
```pcss | ||
.example { | ||
place-self: center; | ||
place-content: space-between center; | ||
place-self: center; | ||
place-content: space-between center; | ||
} | ||
/* after */ | ||
/* becomes */ | ||
.example { | ||
align-self: center; | ||
justify-self: center; | ||
align-content: space-between; | ||
justify-content: center; | ||
align-self: center; | ||
justify-self: center; | ||
place-self: center; | ||
align-content: space-between; | ||
justify-content: center; | ||
place-content: space-between center; | ||
} | ||
``` | ||
## Options | ||
#### `prefix` | ||
Type: `String` | ||
Default: `null` | ||
Specifies a prefix to be surrounded by dashes before the declaration (e.g. `prefix: 'x'` changes the detected property to `-x-place-content`). | ||
## Usage | ||
Add [Place] to your build tool: | ||
Add [PostCSS Place Properties] to your build tool: | ||
```bash | ||
npm install jonathantneal/postcss-place --save-dev | ||
npm install postcss-place --save-dev | ||
``` | ||
@@ -48,4 +40,8 @@ | ||
Use [PostCSS Place Properties] to process your CSS: | ||
```js | ||
require('postcss-place').process(YOUR_CSS, { /* options */ }); | ||
import postcssPlace from 'postcss-place'; | ||
postcssPlace.process(YOUR_CSS, /* processOptions */, /* pluginOptions */); | ||
``` | ||
@@ -61,10 +57,47 @@ | ||
Load [Place] as a PostCSS plugin: | ||
Use [PostCSS Place Properties] as a plugin: | ||
```js | ||
import postcss from 'gulp-postcss'; | ||
import postcssPlace from 'postcss-place'; | ||
postcss([ | ||
require('postcss-place')({ /* options */ }) | ||
]).process(YOUR_CSS, /* options */); | ||
postcssPlace(/* pluginOptions */) | ||
]).process(YOUR_CSS); | ||
``` | ||
#### Webpack | ||
Add [PostCSS Loader] to your build tool: | ||
```bash | ||
npm install postcss-loader --save-dev | ||
``` | ||
Use [PostCSS Place Properties] in your Webpack configuration: | ||
```js | ||
import postcssPlace from 'postcss-place'; | ||
module.exports = { | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.css$/, | ||
use: [ | ||
'style-loader', | ||
{ loader: 'css-loader', options: { importLoaders: 1 } }, | ||
{ loader: 'postcss-loader', options: { | ||
ident: 'postcss', | ||
plugins: () => [ | ||
postcssPlace(/* pluginOptions */) | ||
] | ||
} } | ||
] | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
#### Gulp | ||
@@ -78,16 +111,15 @@ | ||
Enable [Place] within your Gulpfile: | ||
Use [PostCSS Place Properties] in your Gulpfile: | ||
```js | ||
var postcss = require('gulp-postcss'); | ||
import postcss from 'gulp-postcss'; | ||
import postcssPlace from 'postcss-place'; | ||
gulp.task('css', function () { | ||
return gulp.src('./src/*.css').pipe( | ||
postcss([ | ||
require('postcss-place')({ /* options */ }) | ||
]) | ||
).pipe( | ||
gulp.dest('.') | ||
); | ||
}); | ||
gulp.task('css', () => gulp.src('./src/*.css').pipe( | ||
postcss([ | ||
postcssPlace(/* pluginOptions */) | ||
]) | ||
).pipe( | ||
gulp.dest('.') | ||
)); | ||
``` | ||
@@ -103,36 +135,66 @@ | ||
Enable [Place] within your Gruntfile: | ||
Use [PostCSS Place Properties] in your Gruntfile: | ||
```js | ||
import postcssPlace from 'postcss-place'; | ||
grunt.loadNpmTasks('grunt-postcss'); | ||
grunt.initConfig({ | ||
postcss: { | ||
options: { | ||
use: [ | ||
require('postcss-place')({ /* options */ }) | ||
] | ||
}, | ||
dist: { | ||
src: '*.css' | ||
} | ||
} | ||
postcss: { | ||
options: { | ||
use: [ | ||
postcssPlace(/* pluginOptions */) | ||
] | ||
}, | ||
dist: { | ||
src: '*.css' | ||
} | ||
} | ||
}); | ||
``` | ||
[npm-url]: https://www.npmjs.com/package/postcss-place | ||
[npm-img]: https://img.shields.io/npm/v/postcss-place.svg | ||
## Options | ||
### preserve | ||
The `preserve` option determines whether the original place declaration is | ||
preserved. By default, it is preserved. | ||
```js | ||
postcssPlace({ preserve: false }) | ||
``` | ||
```pcss | ||
.example { | ||
place-self: center; | ||
place-content: space-between center; | ||
} | ||
/* becomes */ | ||
.example { | ||
align-self: center; | ||
justify-self: center; | ||
align-content: space-between; | ||
justify-content: center; | ||
} | ||
``` | ||
[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-place.svg | ||
[cli-url]: https://travis-ci.org/jonathantneal/postcss-place | ||
[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-place.svg | ||
[lic-url]: LICENSE.md | ||
[lic-image]: https://img.shields.io/npm/l/postcss-place.svg | ||
[log-url]: CHANGELOG.md | ||
[log-image]: https://img.shields.io/badge/changelog-md-blue.svg | ||
[css-img]: https://cssdb.org/badge/place-properties.svg | ||
[css-url]: https://cssdb.org/#place-properties | ||
[git-img]: https://img.shields.io/badge/support-chat-blue.svg | ||
[git-url]: https://gitter.im/postcss/postcss | ||
[git-image]: https://img.shields.io/badge/chat-gitter-blue.svg | ||
[npm-img]: https://img.shields.io/npm/v/postcss-place.svg | ||
[npm-url]: https://www.npmjs.com/package/postcss-place | ||
[win-img]: https://img.shields.io/appveyor/ci/jonathantneal/postcss-place.svg | ||
[win-url]: https://ci.appveyor.com/project/jonathantneal/postcss-place | ||
[Place]: https://github.com/jonathantneal/postcss-place | ||
[CSS Box Alignment Module Level 3]: https://drafts.csswg.org/css-align/#propdef-place-content | ||
[PostCSS]: https://github.com/postcss/postcss | ||
[CSS Box Alignment]: https://www.w3.org/TR/css-align-3/#place-content | ||
[Gulp PostCSS]: https://github.com/postcss/gulp-postcss | ||
[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss | ||
[PostCSS]: https://github.com/postcss/postcss | ||
[PostCSS Loader]: https://github.com/postcss/postcss-loader | ||
[PostCSS Place Properties]: https://github.com/jonathantneal/postcss-place |
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
15532
6
74
197
9
Updatedpostcss@^6.0.22