From a52fb3b6c28052a2a7103252c7f77a5faf05e687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=82=85=E9=B9=8F?= Date: Fri, 5 Mar 2021 15:29:13 +0800 Subject: [PATCH] Update the calling method of postcss.atRule internal postcss.atRule has been new --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 6419322..3beab48 100755 --- a/index.js +++ b/index.js @@ -134,7 +134,7 @@ module.exports = postcss.plugin('postcss-px-to-viewport', function (options) { }); if (landscapeRules.length > 0) { - var landscapeRoot = new postcss.atRule({ params: '(orientation: landscape)', name: 'media' }); + var landscapeRoot = postcss.atRule({ params: '(orientation: landscape)', name: 'media' }); landscapeRules.forEach(function(rule) { landscapeRoot.append(rule);