# postcss-mobile-hover

> PostCSS plugin that transforms :hover selectors to :active on devices where a mouse isn't the primary input mechanism

Latest version **1.0.2** (published 2022-02-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-mobile-hover
pnpm add postcss-mobile-hover
yarn add postcss-mobile-hover
bun add postcss-mobile-hover
```

## 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.2 |
| Published | 2022-02-22 |
| First published | 2018-03-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| Author | Mads Felskov Agersten |
| Maintainers | felskov |
| Keywords | postcss, css, postcss-plugin, hover, mobile |

## Links

- npm: https://www.npmjs.com/package/postcss-mobile-hover
- Repository: https://gitlab.felskov.io:2224/contentengine/postcss-mobile-hover
- npm.io page: https://npm.io/package/postcss-mobile-hover

## Dependencies (1)

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

## 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.2 (latest) — 2022-02-22
- 1.0.1 — 2018-07-20
- 1.0.0 — 2018-03-02

## README

# PostCSS Mobile Hover

[PostCSS] plugin that transforms :hover selectors to :active on devices where a mouse isn't the primary input mechanism.

```css
a:hover {
    color: #f00;
}
```

```css
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    a:hover {
        color: #f00;
    }
}
@-moz-document url-prefix() {
    a:hover {
        color: #f00;
    }
}
@media (hover: hover) {
    a:hover {
        color: #f00;
    }
}
@media (hover: none) {
    a:active {
        color: #f00;
    }
}
```

This plugin correctly supports IE10+, Edge, Chrome 38+, Safari 9+ and Firefox
desktop. In Firefox mobile, the :hover selector will still be applied to
elements due to missing support of the `@media (hover: none)` query.

## Usage

```js
postcss([ require('postcss-mobile-hover') ])
```

See [PostCSS] docs for examples for your environment.

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

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