gavinmcfarland / postcss-negative-padding

Use negative values with padding to increase the hit area of a target

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PostCSS Negative Padding PostCSS Logo

NPM Version Linux Build Status Windows Build Status Gitter Chat

A PostCSS plugin which lets you use negative values with padding to increase the hit area without effecting the layout. It uses negative margin to compensate for the padding to prevent movement in the layout.

Usage

Example:

div {
    padding: -20px;
}

Outputs:

div {
    padding-top: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
    padding-left: 20px;
    margin-top: -20px;
    margin-right: -20px;
    margin-bottom: -20px;
    margin-left: -20px;
}

Setup

npm install postcss-negative-padding --save-dev

About

Use negative values with padding to increase the hit area of a target

License:Creative Commons Zero v1.0 Universal


Languages

Language:JavaScript 90.8%Language:CSS 9.2%