Socket
Book a DemoInstallSign in
Socket

postcss-travix

Package Overview
Dependencies
Maintainers
7
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-travix

PostCSS plugin for Travix

0.3.0
latest
Source
npmnpm
Version published
Weekly downloads
42
-48.15%
Maintainers
7
Weekly downloads
 
Created
Source

postcss-travix

npm Build Status

PostCSS plugin for Travix

Installation

With npm:

$ npm install --save postcss postcss-travix

Usage

PostCSS

const postcss = require('postcss');

postcss([
  require('postcss-travix')({ /* plugin options */ })
])
  .process(YOUR_CSS, { /* process options */ })
  .then(function (result) {
    // console.log(result.css);
  });

Options

Options can be passed for individual processors:

postcss([
  require('postcss-travix')({
    autoprefixer: {
      browsers: ['last 2 versions']
    }
  })
]);

You can also disable some plugins:

postcss([
  require('postcss-travix')({
    autoprefixer: {
      disabled: true
    }
  })
]);

You can find the list of processors with their names and default options in processors.js file.

Features

Nesting

Input:

.nested {
  .selector {
    .here {
      padding: 0;
    }
  }
}

Output:

.nested .selector .here {
  padding: 0;
}

Custom Properties (Variables)

Input:

:root {
  --my-var: blue;
}

div {
  border-color: var(--variable-defined-elsewhere);
  background: var(--my-var);
}

Output:

div {
  border-color: var(--variable-defined-elsewhere);
  background: blue;
}

For additional reference, visit the plugin's documentation

Autoprefixing

We support compatibility with older versions of browsers, and the current list of browsers consists of:

  • last 2 versions
  • Explorer >= 10
  • Safari >= 5

The naming convention of the browsers follow Browserslist.

Input:

.myClass {
  flex: 1;
}

Output:

.myClass {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

License

MIT © Travix International

FAQs

Package last updated on 14 Aug 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.