Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/madeleineostoja/postcss-position
PostCSS plugin that adds shorthand declarations for position attributes
https://github.com/madeleineostoja/postcss-position
css positioning postcss postcss-plugin
Last synced: about 2 months ago
JSON representation
PostCSS plugin that adds shorthand declarations for position attributes
- Host: GitHub
- URL: https://github.com/madeleineostoja/postcss-position
- Owner: madeleineostoja
- License: mit
- Created: 2015-06-15T11:18:56.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-02-28T06:57:52.000Z (almost 2 years ago)
- Last Synced: 2024-10-13T14:14:43.756Z (2 months ago)
- Topics: css, positioning, postcss, postcss-plugin
- Language: JavaScript
- Homepage:
- Size: 168 KB
- Stars: 25
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PostCSS Position
[![NPM version][npm-badge]][npm-url] [![Downloads][downloads-badge]][npm-url] [![Build Status][travis-badge]][travis-url][PostCSS][PostCSS] plugin that adds shorthand attributes to position declarations.
_Part of [Rucksack - CSS Superpowers](http://simplaio.github.io/rucksack)_
**Input**
```css
.foo {
position: absolute 10px 0;
}.bar {
position: fixed 0;
}.baz {
position: relative 30% auto 0;
}.fab {
position: absolute 10px 0 20px 30px;
}
```**Output**
```css
.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
```js
postcss([ require('postcss-position') ])
```See [PostCSS][PostCSS] docs for examples for your environment.
***
MIT © [Sean King](https://twitter.com/seaneking)
[npm-badge]: https://badge.fury.io/js/postcss-position.svg
[npm-url]: https://npmjs.org/package/postcss-position
[downloads-badge]: https://img.shields.io/npm/dm/postcss-position.svg
[travis-badge]: https://travis-ci.org/seaneking/postcss-position.svg?branch=master
[travis-url]: https://travis-ci.org/seaneking/postcss-position
[PostCSS]: https://github.com/postcss/postcss