# postcss-overflow-overlay

> PostCSS plugin for adding 'overflow: overlay' style for elements with 'overflow: auto'

Latest version **1.0.0** (published 2022-08-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-overflow-overlay
pnpm add postcss-overflow-overlay
yarn add postcss-overflow-overlay
bun add postcss-overflow-overlay
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-08-09 |
| First published | 2022-06-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.0.0 |
| Dependencies | 0 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | hcl2020 |
| Maintainers | hcl2020 |
| Keywords | postcss, css, postcss-plugin, postcss-overflow-overlay, overflow, overlay, scroll, chrome |

## Links

- npm: https://www.npmjs.com/package/postcss-overflow-overlay
- Repository: https://github.com/hcl2020/postcss-overflow-overlay
- Homepage: https://github.com/hcl2020/postcss-overflow-overlay#postcss-overflow-overlay
- Issues: https://github.com/hcl2020/postcss-overflow-overlay/issues
- npm.io page: https://npm.io/package/postcss-overflow-overlay

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

- 1.0.0 (latest) — 2022-08-09
- 0.0.0 — 2022-06-22

## README

# PostCSS Overflow Overlay

[postcss]: https://github.com/postcss/postcss
[mit]: https://github.com/hcl2020/postcss-overflow-overlay/blob/master/LICENSE
[official docs]: https://github.com/postcss/postcss#usage
[releases history]: https://github.com/hcl2020/postcss-overflow-overlay/blob/master/CHANGELOG.md

[![npm](https://img.shields.io/npm/v/postcss-overflow-overlay.svg)](https://www.npmjs.com/package/postcss-overflow-overlay)
[![npm](https://img.shields.io/npm/dt/postcss-overflow-overlay.svg)](https://www.npmjs.com/package/postcss-overflow-overlay)

[PostCSS] plugin for adding 'overflow: overlay' style for elements with 'overflow: auto' style.

```css
/* Input example */
.foo {
  overflow: auto;
}

/* Output example */
.foo {
  overflow: auto;
  overflow: overlay;
}
```

## 🍳 Usage

**Step 1:** Install plugin:

```sh
npm install --save-dev postcss postcss-overflow-overlay
```

**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-overflow-overlay'),
    require('autoprefixer')
  ]
}
```

## 📝 More Example

```css
/* Input */
.foo {
  overflow-x: auto;
}

/* Output */
.foo {
  overflow-x: auto;
  overflow-x: overlay;
}
```

```css
/* Input */
.foo {
  overflow: hidden auto;
}

/* Output */
.foo {
  overflow: hidden auto;
  overflow: hidden overlay;
}
```

```css
/* Input */
.foo {
  overflow: auto !important;
}

/* Output */
.foo {
  overflow: auto !important;
  overflow: overlay !important;
}
```

```css
/* Input */
.foo {
  overflow: auto;
  overflow: scroll;
}

/* Output */
.foo {
  overflow: auto;
  overflow: overlay;
  overflow: scroll;
}
```

```css
/* Input */
.foo {
  overflow: auto;
  overflow: auto;
}

/* Output */
.foo {
  overflow: auto;
  overflow: overlay;
  overflow: auto;
}
```

```css
/* Input */
.foo {
  /** overflow-overlay: off */
  overflow: auto;
}

/* Output */
.foo {
  overflow: auto;
}
```

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

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