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

postcss-pxtorem

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-pxtorem - npm Package Compare versions

Comparing version 5.1.0 to 5.1.1

2

lib/pixel-unit-regex.js

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

module.exports = /"[^"]+"|'[^']+'|url\([^)]+\)|(\d*\.?\d+)px/g;
module.exports = /"[^"]+"|'[^']+'|url\([^)]+\)|var\([^)]+\)|(\d*\.?\d+)px/g;
{
"name": "postcss-pxtorem",
"description": "A CSS post-processor that converts px to rem.",
"version": "5.1.0",
"version": "5.1.1",
"author": "cuth",

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

@@ -50,2 +50,15 @@ // Jasmine unit tests

it("should ignore px in custom property names", function() {
var rules =
":root { --rem-14px: 14px; } .rule { font-size: var(--rem-14px); }";
var expected =
":root { --rem-14px: 0.875rem; } .rule { font-size: var(--rem-14px); }";
var options = {
propList: ["--*", "font-size"]
};
var processed = postcss(pxtorem(options)).process(rules).css;
expect(processed).toBe(expected);
});
it("should handle < 1 values and values without a leading 0", function() {

@@ -52,0 +65,0 @@ var rules = ".rule { margin: 0.5rem .5px -0.2px -.2em }";

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