Skip to content

kinday/postcss-axis

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PostCSS Axis Build Status

PostCSS plugin which adds shorthands for opposite properties.

/* Input example */
.foo {
  margin-x: 10px;
  padding-y: 10px 20px;
  border-x: 1px solid #f00;
  border-y-color: #fff;
}
/* Output example */
.foo {
  margin-left: 10px;
  margin-right: 10px;
  padding-top: 10px;
  padding-bottom: 20px;
  border-left: 1px solid #f00;
  border-right: 1px solid #f00;
  border-top-color: #fff;
  border-bottom-color: #fff;
}

Installation

npm install postcss-axis

Usage

postcss([ require('postcss-axis') ])

Options

trbl

Type: Boolean Default: false

Swaps left and right values in shorthands according to TRBL model.


See PostCSS docs for examples for your environment.

About

Shorthands for opposite properties

Resources

License

Stars

Watchers

Forks

Packages

No packages published