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

em-media-query

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

em-media-query

Transform min/max-width/height media queries to ems.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12K
increased by26.96%
Maintainers
1
Weekly downloads
 
Created
Source

em-media-query

Build Status

Transform min/max-width/height media queries to ems.

This is a low-level module. You’re probably looking for PostCSS or Babel plugin.

Install

npm install em-media-query --save

Usage

import meMediaQuery from 'em-media-query';

console.log(emMediaQuery('screen and (min-width:600px)'));
// 'screen and (min-width:37.5em)'

API

emMediaQuery(str, [opts])

Returns: string

str

Type: string

Media query to convert.

opts

Type: Object

precision

Type: number
Default: 5

Rounding precision for values.

License

MIT © Ivan Nikolić

Keywords

FAQs

Package last updated on 21 Oct 2020

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