@quid/postcss-what-input
Version:
A PostCSS plugin used to make it easy to interact with the npm module "what-input".
20 lines (14 loc) • 576 B
Markdown
You need [`what-input`](https://www.npmjs.com/package/what-input) enabled in your
app in order to use this plugin.
This PostCSS plugin adds two new CSS pseudo selectors: `:focus-mouse` and
`:focus-keyboard`.
The first will target focused elements only if they have been focused using mouse.
The other will target focused elements only if focused using keyboard.
This is particularly useful to disable the focus ring from elements only when
the user is using the mouse or on first page load:
```css
.MyInputElement:focus-mouse {
outline: 0;
}
```