Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-mobile-hover

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-mobile-hover

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

  • 1.0.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

PostCSS Mobile Hover

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

a:hover {
    color: #f00;
}
@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

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

See PostCSS docs for examples for your environment.

Keywords

FAQs

Package last updated on 22 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc