cipherdevgroup / cipher-theme-config

Grunt configuration for Cipher themes
MIT License
8 stars 4 forks source link

Add postcss-pixtorem #5

Closed robneu closed 8 years ago

robneu commented 8 years ago

I hate using relative values when writing CSS. I find it much easier to define sizes in pixels, mostly because it's the way I've worked for years and I don't feel like re-training my brain to another unit.

That said, I recognize that relative units do have benefits, so I'd like to try to get node-pixrem working through grunt-postcss. I tried loading it in, but for whatever reason I couldn't get it to work.

ctalkington commented 8 years ago

@robneu i think you were just missing that they should be called as functions like the example here:

https://github.com/nDmitry/grunt-postcss#usage

robneu commented 8 years ago

Haha I was just missing parenthesis? 😕

ctalkington commented 8 years ago

yah, though im not sure that package does what you're thinking as it sets px fallbacks from rem values not the reverse.

this might be closer to desired? https://github.com/ggkovacs/node-px2rem

ctalkington commented 8 years ago

also from: http://postcss.parts/

https://github.com/cuth/postcss-pxtorem

robneu commented 8 years ago

Ah, yeah thanks man! https://github.com/cuth/postcss-pxtorem is the one I mean to test out originally. I'll give this another try today.

robneu commented 8 years ago

Seems like this is working as-expected. Thanks for the help @ctalkington!