Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

csstools/postcss-inset

Repository files navigation

⚠️ PostCSS Inset is deprecated in favor of postcss-logical. ⚠️

PostCSS Inset PostCSS Logo

NPM Version Linux Build Status Windows Build Status Gitter Chat

PostCSS Inset lets you do use the inset shorthand property in CSS.

.example {
  inset: 10px 20px 80px;
}

/* becomes */

.example {
  top: 10px;
  right: 20px;
  bottom: 80px;
  left: 20px;
}

Usage

Add PostCSS Inset to your build tool:

npm install postcss-inset --save-dev

Node

Use PostCSS Inset to process your CSS:

require('postcss-inset').process(YOUR_CSS);

PostCSS

Add PostCSS to your build tool:

npm install postcss --save-dev

Use PostCSS Inset as a plugin:

postcss([
  require('postcss-inset')()
]).process(YOUR_CSS);

Gulp

Add Gulp PostCSS to your build tool:

npm install gulp-postcss --save-dev

Use PostCSS Inset in your Gulpfile:

var postcss = require('gulp-postcss');

gulp.task('css', function () {
  return gulp.src('./src/*.css').pipe(
    postcss([
      require('postcss-inset')()
    ])
  ).pipe(
    gulp.dest('.')
  );
});

Grunt

Add Grunt PostCSS to your build tool:

npm install grunt-postcss --save-dev

Use PostCSS Inset in your Gruntfile:

grunt.loadNpmTasks('grunt-postcss');

grunt.initConfig({
  postcss: {
    options: {
      use: [
        require('postcss-inset')()
      ]
    },
    dist: {
      src: '*.css'
    }
  }
});

About

Use the inset property in CSS

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published