JSPM

postcss-vmax

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 24
  • Score
    100M100P100Q63530F
  • License CC0-1.0

Use vmax units in Edge and Internet Explorer

Package Exports

  • postcss-vmax

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (postcss-vmax) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

PostCSS VMax PostCSS Logo

NPM Version Build Status Licensing Changelog Gitter Chat

PostCSS VMax lets you use vmax units in Edge and Internet Explorer.

/* before */

.example {
    font-size: 1vmax;
}

/* after */

@media (orientation: landscape) {
    .example {
        font-size: 1vw;
    }
}

@media (orientation: portrait) {
    .example {
        font-size: 1vh;
    }
}

.example {
    font-size: 1vmax;
}

Usage

Add PostCSS VMax to your build tool:

npm install postcss-vmax --save-dev

Node

require('postcss-vmax').process(YOUR_CSS, { /* options */ });

PostCSS

Add PostCSS to your build tool:

npm install postcss --save-dev

Load PostCSS VMax as a PostCSS plugin:

postcss([
    require('postcss-vmax')({ /* options */ })
]).process(YOUR_CSS, /* options */);

Gulp

Add Gulp PostCSS to your build tool:

npm install gulp-postcss --save-dev

Enable PostCSS VMax within your Gulpfile:

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

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

Grunt

Add Grunt PostCSS to your build tool:

npm install grunt-postcss --save-dev

Enable PostCSS VMax within your Gruntfile:

grunt.loadNpmTasks('grunt-postcss');

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