Package detail

postcss-position

seaneking19.6kMIT1.1.0

PostCSS plugin that adds shorthand attributes methods to position declarations.

postcss, css, postcss-plugin, position

readme

PostCSS Position

NPM version Downloads Build Status

PostCSS plugin that adds shorthand attributes to position declarations.

Part of Rucksack - CSS Superpowers

Input

.foo {
  position: absolute 10px 0;
}

.bar {
  position: fixed 0;
}

.baz {
  position: relative 30% auto 0;
}

.fab {
  position: absolute 10px 0 20px 30px;
}

Output

.foo {
  position: absolute;
  top: 10px;
  right: 0;
  bottom: 10px;
  left: 0;
}

.bar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.baz {
  position: relative;
  top: 30%;
  right: auto;
  bottom: 0;
  left: auto;
}

.fab {
  position: absolute;
  top: 10px;
  right: 0;
  bottom: 20px;
  left: 30px;
}

Usage

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

See PostCSS docs for examples for your environment.


MIT © Sean King

changelog

Change Log

v1.0.0 (2017-07-26)

Full Changelog

Merged pull requests:

v0.5.0 (2016-06-02)

Full Changelog

Closed issues:

  • calc in value #7
  • Merge features? #6

Merged pull requests:

  • feat: position with falsey offsets are removed #8 (maraisr)

v0.4.0 (2015-09-06)

Full Changelog

Closed issues:

  • Move to PostCSS 5.0 #5
  • Change syntax to augment position: type; #4

v0.3.1 (2015-08-15)

Full Changelog

v0.3.0 (2015-08-15)

Full Changelog

Merged pull requests:

  • Use single loop for declarations with filter #3 (ilyashubin)

v0.2.1 (2015-07-21)

Full Changelog

v0.2.0 (2015-06-16)

Full Changelog

v0.1.1 (2015-06-16)

Full Changelog

Closed issues:

  • Send PT to PostCSS README #1

Merged pull requests:

v0.1.0 (2015-06-15)

* This Change Log was automatically generated by github_changelog_generator