🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@tianz/postcss-px-to-viewport

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

@tianz/postcss-px-to-viewport - npm Package Compare versions

Comparing version

to
1.1.0

0

CHANGELOG.md

@@ -0,0 +0,0 @@ # Changelog

@@ -0,0 +0,0 @@ ## Code of Conduct

@@ -0,0 +0,0 @@ # Contributing Guidelines

@@ -0,0 +0,0 @@ 'use strict';

7

index.js

@@ -21,3 +21,6 @@ 'use strict';

landscapeUnit: 'vw',
landscapeWidth: 568
landscapeWidth: 568,
// when andriod keyboard popup, it will use landscape, so that it should be min-aspect-ratio but not only landscape
// set landscapeAspectRatio to '13/9' will be better, or you can set it by youself
landscapeAspectRatio: '13/9',
};

@@ -153,3 +156,3 @@

// When keyboard popup in Android, it with use landscape, so that it should be min-aspect-ratio but not only landscape
var landscapeRoot = new AtRule({ params: '(min-aspect-ratio: 13/9) and (orientation: landscape)', name: 'media' });
var landscapeRoot = new AtRule({ params: '(min-aspect-ratio: ' + opts.landscapeAspectRatio + ') and (orientation: landscape)', name: 'media' });

@@ -156,0 +159,0 @@ landscapeRules.forEach(function(rule) {

{
"name": "@tianz/postcss-px-to-viewport",
"description": "A CSS post-processor that converts px to viewport units (vw, vh, vmin, vmax).",
"version": "1.0.1",
"version": "1.1.0",
"author": "Dmitry Karpunin <koderfunk@gmail.com>",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -105,3 +105,4 @@ # postcss-px-to-viewport

landscapeUnit: 'vw',
landscapeWidth: 568
landscapeWidth: 568,
landscapeAspectRatio: '13/9',
}

@@ -138,6 +139,7 @@ ```

- `landscapeWidth` (Number) 横屏时使用的视口宽度
- `landscapeAspectRatio` (String) 当安卓的键盘弹出时,可能会使用横屏模式,所以应该设置`min-aspect-ratio`而不是使用`landscape`。把这个值设为13/9会更合适,或者你可以自定义。
> `exclude`和`include`是可以一起设置的,将取两者规则的交集。
#### Ignoring (需要翻译帮助。)
#### Ignoring

@@ -144,0 +146,0 @@ You can use special comments for ignore conversion of single lines:

@@ -105,3 +105,4 @@ # postcss-px-to-viewport

landscapeUnit: 'vw',
landscapeWidth: 568
landscapeWidth: 568,
landscapeAspectRatio: '13/9',
}

@@ -135,5 +136,6 @@ ```

- If value is array, the elements of the array are regexp.
- `landscape` (Boolean) Adds `@media (min-aspect-ratio: 13/9) and (orientation: landscape)` with values converted via `landscapeWidth`.
- `landscape` (Boolean) Adds `@media (min-aspect-ratio: 13/9) and (orientation: landscape)` with values converted via `landscapeWidth`. You can set `min-aspect-ratio: 13/9` by set `landscapeAspectRatio`.
- `landscapeUnit` (String) Expected unit for `landscape` option
- `landscapeWidth` (Number) Viewport width for landscape orientation.
- `landscapeAspectRatio` (String) When andriod keyboard popup, it will use landscape, so that it should be min-aspect-ratio but not only landscape. Set landscapeAspectRatio to '13/9' will be better, or you can set it by youself.

@@ -140,0 +142,0 @@ > `exclude` and `include` can be set together, and the intersection of the two rules will be taken.

@@ -0,0 +0,0 @@ // excluding regex trick: http://www.rexegg.com/regex-best-trick.html

@@ -0,0 +0,0 @@ var filterPropList = {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet