# v9helper-babel-plugin-shorthands

> Babel plugin to identify CSS shorthands in makeStyles call and transform it

Latest version **0.0.10** (published 2023-06-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install v9helper-babel-plugin-shorthands
pnpm add v9helper-babel-plugin-shorthands
yarn add v9helper-babel-plugin-shorthands
bun add v9helper-babel-plugin-shorthands
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.10 |
| Published | 2023-06-28 |
| First published | 2022-03-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 37.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | yuanboxue-amber |

## Links

- npm: https://www.npmjs.com/package/v9helper-babel-plugin-shorthands
- Repository: https://github.com/YuanboXue-Amber/style-transform-tool
- Homepage: https://github.com/YuanboXue-Amber/style-transform-tool#readme
- Issues: https://github.com/YuanboXue-Amber/style-transform-tool/issues
- npm.io page: https://npm.io/package/v9helper-babel-plugin-shorthands

## Dependencies (1)

- [@griffel/core](https://npm.io/package/@griffel/core.md) ^1.12.1

## Recent versions

- 0.0.10 (latest) — 2023-06-28
- 0.0.5 (testing-new-feature) — 2022-09-25
- 0.0.9 — 2023-05-03
- 0.0.7 — 2022-11-08
- 0.0.6 — 2022-09-25
- 0.0.4 — 2022-08-11
- 0.0.3 — 2022-04-07
- 0.0.2 — 2022-04-07
- 0.0.1-20220331 — 2022-03-31

## README

Babel plugin to identify CSS shorthands in makeStyles call and transform it.

```ts
import { transformShorthandsPlugin } from "v9helper-babel-plugin-shorthands";

const result = Babel.transform(
  `
export const useStyles = makeStyles({
  root: {
    border: \`0.1rem solid red\`
  }
});
`,
  {
    filename: "styles.ts",
    plugins: [[transformShorthandsPlugin]],
  }
).code;
```

result will be:

```ts
export const useStyles = makeStyles({
  root: {
    ...shorthands.border("0.1rem", "solid", "red"),
  },
});
```

---
_Source: https://npm.io/package/v9helper-babel-plugin-shorthands · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
