# postcss-short-border-radius

> Use more border-radius properties in CSS

Latest version **3.0.0** (published 2018-10-10) · CC0-1.0 license · 0 weekly downloads

## Install

```sh
npm install postcss-short-border-radius
pnpm add postcss-short-border-radius
yarn add postcss-short-border-radius
bun add postcss-short-border-radius
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2018-10-10 |
| First published | 2016-10-03 |
| Weekly downloads | 0 |
| License | CC0-1.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=6.0.0 |
| Dependencies | 1 |
| Unpacked size | 21.1 KB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Jonathan Neal |
| Maintainers | jonathantneal |
| Keywords | postcss, css, postcss-plugin, border, edge, shorthand, short |

## Links

- npm: https://www.npmjs.com/package/postcss-short-border-radius
- Repository: https://github.com/jonathantneal/postcss-short-border-radius
- Homepage: https://github.com/jonathantneal/postcss-short-border-radius#readme
- Issues: https://github.com/jonathantneal/postcss-short-border-radius/issues
- npm.io page: https://npm.io/package/postcss-short-border-radius

## Dependencies (1)

- [postcss](https://npm.io/package/postcss.md) ^7.0.5

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 3.0.0 (latest) — 2018-10-10
- 2.0.0 — 2017-05-25
- 1.0.1 — 2016-12-06
- 1.0.0 — 2016-10-03

## README

# PostCSS Short Border Radius [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss]

[![NPM Version][npm-img]][npm-url]
[![Build Status][cli-img]][cli-url]
[![Support Chat][git-img]][git-url]

[PostCSS Short Border Radius] lets you use `border-top-radius`,
`border-right-radius`, `border-bottom-radius`, and `border-left-radius`
properties in CSS, following the [1-to-2 syntax].

```pcss
.example-1 {
  border-top-radius: 10px;
}

.example-2 {
  border-top-radius: 10px 5px;
}

/* becomes */

.example-1 {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.example-2 {
  border-top-left-radius: 10px;
  border-top-right-radius: 5px;
}
```

## Usage

Add [PostCSS Short Border Radius] to your project:

```bash
npm install postcss-short-border-radius --save-dev
```

Use [PostCSS Short Border Radius] to process your CSS:

```js
const postcssShortBorderRadius = require('postcss-short-border-radius');

postcssShortBorderRadius.process(YOUR_CSS /*, processOptions, pluginOptions */);
```

Or use it as a [PostCSS] plugin:

```js
const postcss = require('postcss');
const postcssShortBorderRadius = require('postcss-short-border-radius');

postcss([
  postcssShortBorderRadius(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);
```

[PostCSS Short Border Radius] runs in all Node environments, with special instructions for:

| [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |
| --- | --- | --- | --- | --- | --- |

## Options

#### prefix

The `prefix` option defines a prefix required by properties being transformed.
Wrapping dashes are automatically applied, so that `x` would transform
`-x-border-top-radius`.

```js
postcssShortBorderRadius({ prefix: 'x' });
```

```pcss
.example-1 {
  -x-border-top-radius: 10px;
}

/* becomes */

.example-1 {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
```

#### skip

The `skip` option defines the skip token used to ignore portions of the
shorthand.

```js
postcssShortBorderRadius({ skip: '-' });
```

```pcss
.example-1 {
  -x-border-top-radius: - 10px;
}

/* becomes */

.example-1 {
  border-top-right-radius: 10px;
}
```

[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-short-border-radius.svg
[cli-url]: https://travis-ci.org/jonathantneal/postcss-short-border-radius
[git-img]: https://img.shields.io/badge/support-chat-blue.svg
[git-url]: https://gitter.im/postcss/postcss
[npm-img]: https://img.shields.io/npm/v/postcss-short-border-radius.svg
[npm-url]: https://www.npmjs.com/package/postcss-short-border-radius

[1-to-2 syntax]: https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties#Tricky_edge_cases
[PostCSS]: https://github.com/postcss/postcss
[PostCSS Short Border Radius]: https://github.com/jonathantneal/postcss-short-border-radius

---
_Source: https://npm.io/package/postcss-short-border-radius · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
