markgoodyear / postcss-vertical-rhythm

A PostCSS plugin to create a custom vertical rhythm unit from the base font-size and line-height.
MIT License
74 stars 6 forks source link

rems #5

Open VinSpee opened 8 years ago

VinSpee commented 8 years ago

I'd love for this to output rems, is that possible?

markgoodyear commented 8 years ago

@VinSpee This should be possible yes. I need to update the plugin for the latest PostCSS, so I'll look to add this in with it.

markgoodyear commented 8 years ago

In fact, I'll push the rem's back for a feature release as I think it'll need some testing. Rem output is going to depend on where the font-size declaration is set, and then will need to account for if it's originally set in rem too.

@VinSpee How do you typically set up a project in terms of the above?

BarryThePenguin commented 8 years ago

If it helps, I use px-to-rem. I prefer the idea of keeping plugins/modules to a small maintainable set of features

markgoodyear commented 8 years ago

I use that to for projects instead of Sass mixins. I find it works really well, being able to whitelist/blacklist properties is very handy. Perhaps it could be worth a try before implementing rem output @VinSpee?

VinSpee commented 8 years ago

I will definitely try that, but one could argue the opposite - that this library should only do rems and to  use rem-to-px to convert lol. 

All in all I think the conversion should be a fine solution. 

(null)

On Wed, Nov 18, 2015 at 6:23 PM, Mark Goodyear notifications@github.com wrote:

I use that too for projects instead of Sass mixins. I find it works really well, being able to whitelist/blacklist properties is very handy. Perhaps it could be worth a try before implementing rem output @VinSpee?

Reply to this email directly or view it on GitHub: https://github.com/markgoodyear/postcss-vertical-rhythm/issues/5#issuecomment-157897004

ghost commented 8 years ago

I might be late in the conversation but since the issue is still open, and since I just started using this too, I'll put my opinion: Rem output is not going to depend on where the font-size declaration is set, it will always depend on the root size. So I think switching from px to rem should be fairly safe, unless I'm missing something else. And as @BarryThePenguin says, px-to-rem could be another option, but it feels kinda awkward, it might be just me though.