# postcss-indonesian-stylesheets

> PostCSS plugin for writing CSS in Indonesian

Latest version **2.1.0** (published 2026-09-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-indonesian-stylesheets
pnpm add postcss-indonesian-stylesheets
yarn add postcss-indonesian-stylesheets
bun add postcss-indonesian-stylesheets
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2026-09-26 |
| First published | 2022-04-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=24 |
| Dependencies | 2 |
| Unpacked size | 77.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| Author | Pinto Karsanda <pintokarsanda@gmail.com> |
| Maintainers | karsanda |
| Keywords | postcss, css, postcss-plugin, postcss-indonesian-stylesheets |

## Links

- npm: https://www.npmjs.com/package/postcss-indonesian-stylesheets
- Repository: karsanda/postcss-indonesian-stylesheets
- npm.io page: https://npm.io/package/postcss-indonesian-stylesheets

## Dependencies (2)

- [postcss-value-parser](https://npm.io/package/postcss-value-parser.md) ^4.2.0
- [postcss-selector-parser](https://npm.io/package/postcss-selector-parser.md) ^7.1.6

## 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

- 2.1.0 (latest) — 2026-09-26
- 2.0.0 — 2026-09-26
- 1.1.0 — 2023-09-17
- 1.0.1 — 2023-02-14
- 1.0.0 — 2022-04-16
- 0.0.0 — 2022-04-16

## README

# postcss-indonesian-stylesheets

[PostCSS] plugin for writing CSS in Indonesian.

[PostCSS]: https://github.com/postcss/postcss

```css
.foo {
  /* Input example */
  a {
    warna: merah paksakan!;
  }
}
```

```css
.foo {
  /* Output example */
  a {
    color: red !important;
  }
}
```

## Usage

**Step 1:** Install plugin:

```sh
npm install --save-dev postcss postcss-indonesian-stylesheets
# or
pnpm add -D postcss postcss-indonesian-stylesheets
```

Requires Node.js 24 or newer.

**Step 2:** Check you project for existed PostCSS config: `postcss.config.js`
in the project root, `"postcss"` section in `package.json`
or `postcss` in bundle config.

If you do not use PostCSS, add it according to [official docs]
and set this plugin in settings.

**Step 3:** Add the plugin to plugins list:

```diff
module.exports = {
  plugins: [
+   require('postcss-indonesian-stylesheets'),
    require('autoprefixer')
  ]
}
```

The plugin ships ES module and CommonJS builds with TypeScript types, so ESM configs work too:

```js
// postcss.config.mjs
import indonesian from 'postcss-indonesian-stylesheets'

export default {
  plugins: [indonesian()]
}
```

[official docs]: https://github.com/postcss/postcss#usage

## How it works

- Property names and every keyword in a value are translated, including keywords inside
  functions: `margin: 0 otomatis` → `margin: 0 auto`, `var(--x, merah)` → `var(--x, red)`.
- Function names are translated: `hitung(100% - 1px)` → `calc(100% - 1px)`.
- `@media`, `@supports`, `@container` and `@custom-media` conditions are translated:
  `@media layar dan (lebar-minimal: 600px)` → `@media screen and (min-width: 600px)`.
- Pseudo-classes and pseudo-elements are translated: `a:arahkan::sebelum` → `a:hover::before`.
- Property names in `transition`, `transition-property` and `will-change` are translated:
  `transisi: lebar 1s` → `transition: width 1s`.
- Matching is case-insensitive.
- `paksakan!` at the end of a value becomes `!important`.
- Strings, `url()`, custom property values (`--foo: merah`) and author-defined names
  (`font-family`, `animation-name`, `grid-area`, `grid-template-areas`, `counter-*`,
  `container-name`, `view-transition-name`, `anchor-name`, …) are left untouched.
  Names inside shorthands such as `animation` or `container` are still translated if they
  happen to be dictionary words.
- Unknown words pass through unchanged, so Indonesian and English can be mixed freely.

## Options

Add your own words or override the built-in ones. Keys are the Indonesian words, values are the CSS they become:

```js
indonesian({
  properties: { 'warna-teks': 'color' },
  values: { 'merah-bata': 'firebrick' },
  functions: { tambah: 'calc' },
  media: { telepon: 'screen' },
  selectors: { disorot: 'hover' }
})
```

Set `warnings: true` to get a PostCSS warning for unknown words that look like a typo of an
Indonesian word:

```
Unknown property "wrna". Did you mean "warna"?
```

## Editor autocomplete

The package ships [VS Code CSS custom data](https://github.com/microsoft/vscode-custom-data)
for the Indonesian property names, pseudo-classes and pseudo-elements. Add it to
`.vscode/settings.json`:

```json
{
  "css.customData": ["./node_modules/postcss-indonesian-stylesheets/css-data.json"]
}
```

## Dictionary

See [DICTIONARY.md](DICTIONARY.md) for every supported property and value.

## Contributing

`postcss-indonesian-stylesheets` doesn't cover all CSS properties and values in Indonesian.
Any help in translating and adding more Indonesian word for properties and values is always appreciated.
Add words to the word lists in `src/` (`properties.ts`, `values.ts`, `functions.ts`, `media.ts`, `selectors.ts`),
then run `pnpm dictionary` to regenerate `DICTIONARY.md` and `css-data.json`,
or [suggest a translation](https://github.com/karsanda/postcss-indonesian-stylesheets/issues/new?template=translation.yml).

### Development

This project uses [pnpm](https://pnpm.io) and Node.js 24+.

```sh
pnpm install
pnpm test        # unit tests with a 100% coverage gate
pnpm lint        # ESLint + Prettier check
pnpm format      # apply Prettier
pnpm dictionary  # regenerate DICTIONARY.md and css-data.json after editing the word lists
pnpm verify      # everything CI runs: lint, typecheck, tests, build, package checks
pnpm changeset   # describe your change for the next release
```

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