New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

math-calc

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

math-calc

math-calc is a simpleset and fast postcss plugin allows you write +、-、*、/、% in your css

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

math-calc

math-calc is a simpleset and fast postcss plugin allows you write + - * / in your css

Usage

Gulp

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

gulp.task('css', function() {
  var processors = [calc];
  return gulp.src('./src/*.css')
    .pipe(postcss(processors))
    .pipe(gulp.dest('./dest'));
});

Input

#demo {
    width: 100px+100px;
    width: 100px + 100px;
    width: 100px   +        100px;

    height: 100px - 100.0px;
    height: 100px - 50;
    height: -10px - -50;
    height: -10px - -50px;

    border: 1 * 2px solid #fafafa;
    border: 1px * 2px solid #fafafa;

    margin: 1/1px 2.1 / 10px 10px / -2 1px     /2px;

    background: 100% / 2;
}

Output

#demo {
    width: 200px;
    width: 200px;
    width: 200px;

    height: 0px;
    height: 50px;
    height: 40px;
    height: 40px;

    border: 2px solid #fafafa;
    border: 2px solid #fafafa;

    margin: 1px 0.21px -5px 0.5px;

    background: 50%;
}

TIPS

Please use this plugin after variable plugin

LICENSE

MIT.

Keywords

postcss-plugin

FAQs

Package last updated on 31 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts