postcss-pxtorem icon indicating copy to clipboard operation
postcss-pxtorem copied to clipboard

Avoid needing to declare each side of the box model

Open simonsmith opened this issue 10 years ago • 3 comments

Great plugin, very useful.

However with properties like margin, padding etc it would be great to use just margin and it cover off margin-top, margin-bottom etc without declaring them all. It gets quite verbose when you add padding in there too.

simonsmith avatar May 01 '15 10:05 simonsmith

That's a good point. Thanks for the idea. I think that can be done.

cuth avatar May 01 '15 12:05 cuth

It might be a little while before I get to this. For now, maybe hide the white list in a separate file.

// postcss-pxtorem white list
module.exports = [
  'font',
  'font-size',
  'line-height',
  'letter-spacing',
  'margin',
  'margin-top',
  'margin-right',
  'margin-bottom',
  'margin-left',
  'padding',
  'padding-top',
  'padding-right',
  'padding-bottom',
  'padding-left'
];

cuth avatar May 04 '15 15:05 cuth

Sure, it's not a big problem. Just a nice to have

simonsmith avatar May 04 '15 17:05 simonsmith