cuth / postcss-pxtorem

Convert pixel units to rem (root em) units using PostCSS
MIT License
2.03k stars 174 forks source link

propList can`t work with property of font or top #55

Closed jingruoyu closed 4 years ago

jingruoyu commented 4 years ago

for example

font: 24px/40px a;
cuth commented 4 years ago

Ah, I'll have to try this out. Thanks!

cuth commented 4 years ago

I couldn't replicate the issue with a test:

it("should be able to handle shorthand`", function() {
  var options = {
    propList: ["font"]
  };
  var rules = ".rule { font: 24px/40px a }";
  var expected = ".rule { font: 1.5rem/2.5rem a }";
  var processed = postcss(pxtorem(options)).process(rules).css;

  expect(processed).toBe(expected);
});

That passed. If it continue to occur can you provide another example?