New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

postcss-mobile-viewportunits

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-mobile-viewportunits

Replaces viewport units for mobile devices not supporting it.

  • 0.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Postcss-mobile-viewportunits

A plugin that transforms the postcss viewport units

Installation and setup

npm install postcss-mobile-viewportunits

Set up

var postcss = require('postcss');

var processor = postcss([
    require('postcss-mobile-viewports')()
]);

Configuration

There is only one option: devices. It is an array of devices. By default the devices iPhone 4, iPhone 5, iPhone 5C, iPhone 5S and iPad are given.

Example:

var postcss = require('postcss');

var processor = postcss([
    require('postcss-mobile-viewports')({
        devices: [
            // iPad portrait
            {
                mediaquery: 'only screen and (-webkit-min-device-pixel-ratio: 1) and (device-width: 768px) and (device-height: 1024px) and (orientation: portrait)',
                width: 768,
                height: 1024
            },
            // iPad landscape
            {
                mediaquery: 'only screen and (-webkit-min-device-pixel-ratio: 1) and (device-width: 768px) and (device-height: 1024px) and (orientation: landscape)',
                width: 1024,
                height: 768
            }
        ]
    })
]);

Keywords

FAQs

Package last updated on 13 Jun 2016

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