Skip to content
PostCSS plugin to add vertical and horizontal spacing rules
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.eslintrc
.gitignore
.npmignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
gulpfile.js
index.js
package.json

README.md

PostCSS Verthorz Build Status

PostCSS plugin to add vertical and horizontal spacing shorthand.

Examples

Shorthand vert and horz declarations

.foo {
    padding-vert: 2rem;
    margin-horz: auto;
}
.foo {
    padding-top: 2rem;
    padding-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
}

Even shorter shorthand declarations

.bar {
    ph: 30px;
    mv: 100px;
}
.bar {
    padding-left: 30px;
    padding-right: 30px;
    margin-top: 100px;
    margin-bottom: 100px;
}

It even supports multiple values!

.baz {
    padding-vert: 10px 15px;
    margin-horz: 15px 21px;
}
.baz {
    padding-top: 10px;
    padding-bottom: 15px;
    margin-left: 15px;
    margin-right: 21px;
}

Usage

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

See PostCSS docs for examples for your environment.

You can’t perform that action at this time.