diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:10:59 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:41:44 +0800 |
| commit | fc87c009806dcc98867f6b58efe29b042aa01dee (patch) | |
| tree | 8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/postcss-unopacity/README.md | |
| parent | 3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff) | |
node: updatemain
Diffstat (limited to 'node_modules/postcss-unopacity/README.md')
| -rw-r--r-- | node_modules/postcss-unopacity/README.md | 187 |
1 files changed, 0 insertions, 187 deletions
diff --git a/node_modules/postcss-unopacity/README.md b/node_modules/postcss-unopacity/README.md deleted file mode 100644 index 16c7ca21..00000000 --- a/node_modules/postcss-unopacity/README.md +++ /dev/null @@ -1,187 +0,0 @@ -# UnOpacity [![Build Status][ci-img]][ci] - -<img align="right" width="135" height="95" src="http://postcss.github.io/postcss/logo-leftp.png" title="Philosopher’s stone, logo of PostCSS"> - -[UnOpacity] replaces the `opacity` property with a `filter` property. This can be useful for outputting CSS for older browsers like Internet Explorer 8. - -```css -/* before */ - -.figure { - opacity: .5; -} - -/* after */ - -.figure { - filter: alpha(opacity=50); -} -``` - -## Usage - -Add [UnOpacity] to your build tool: - -```bash -npm install postcss-unopacity --save-dev -``` - -#### Node - -```js -require('postcss-unopacity')({ /* options */ }).process(YOUR_CSS); -``` - -#### PostCSS - -Add [PostCSS] to your build tool: - -```bash -npm install postcss --save-dev -``` - -Load [UnOpacity] as a PostCSS plugin: - -```js -postcss([ - require('postcss-unopacity')({ /* options */ }) -]); -``` - -#### Gulp - -Add [Gulp PostCSS] to your build tool: - -```bash -npm install gulp-postcss --save-dev -``` - -Enable [UnOpacity] within your Gulpfile: - -```js -var postcss = require('gulp-postcss'); - -gulp.task('css', function () { - return gulp.src('./css/src/*.css').pipe( - postcss([ - require('postcss-unopacity')({ /* options */ }) - ]) - ).pipe( - gulp.dest('./css') - ); -}); -``` - -#### Grunt - -Add [Grunt PostCSS] to your build tool: - -```bash -npm install grunt-postcss --save-dev -``` - -Enable [UnOpacity] within your Gruntfile: - -```js -grunt.loadNpmTasks('grunt-postcss'); - -grunt.initConfig({ - postcss: { - options: { - processors: [ - require('postcss-unopacity')({ /* options */ }) - ] - }, - dist: { - src: 'css/*.css' - } - } -}); -``` - -### Options - -#### `method` - -Type: `String` -Default: `'replace'` - -##### `replace` -Replace any `opacity` property with a fallback. -```css -/* before */ - -.figure { - opacity: .5; -} - -/* after */ - -.figure { - filter: alpha(opacity=50); -} -``` - -##### `copy` -Copy any `opacity` property with a fallback. -```css -/* before */ - -.figure { - opacity: .5; -} - -/* after */ - -.figure { - filter: alpha(opacity=50); - opacity: .5; -} -``` - -##### `warn` -Warn when an `opacity` property is used. - -#### `prefixed` - -Type: `Boolean` -Default: `false` - -##### `true` -Use an `-ms-filter` property as a fallback. -```css -/* before */ - -.figure { - opacity: .5; -} - -/* after */ - -.figure { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; -} -``` - -##### `false` -Use a `filter` property as a fallback. -```css -/* before */ - -.figure { - opacity: .5; -} - -/* after */ - -.figure { - filter: alpha(opacity=50); -} -``` - -[ci]: https://travis-ci.org/jonathantneal/postcss-unopacity -[ci-img]: https://travis-ci.org/jonathantneal/postcss-unopacity.svg -[Gulp PostCSS]: https://github.com/postcss/gulp-postcss -[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss -[PostCSS]: https://github.com/postcss/postcss -[UnOpacity]: https://github.com/jonathantneal/postcss-unopacity |
