PostCSS plugin to fix hover media queries for better touch device support
npm install postcss-media-hover-fixbash
npm install postcss-media-hover-fix --save-dev
`
Usage
Add the plugin to your PostCSS configuration:
`js
// postcss.config.js
module.exports = {
plugins: [
require('postcss-media-hover-fix')
]
}
`
Example
Input:
`css
.button:hover {
background-color: blue;
}
`
Output:
`css
@media (hover: hover) and (pointer: fine) {
.button:hover {
background-color: blue;
}
}
``