postcss-vertical-rhythm icon indicating copy to clipboard operation
postcss-vertical-rhythm copied to clipboard

rems

Open VinSpee opened this issue 9 years ago • 6 comments

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

VinSpee avatar Nov 13 '15 20:11 VinSpee

@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 avatar Nov 18 '15 22:11 markgoodyear

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?

markgoodyear avatar Nov 18 '15 23:11 markgoodyear

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

BarryThePenguin avatar Nov 18 '15 23:11 BarryThePenguin

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?

markgoodyear avatar Nov 18 '15 23:11 markgoodyear

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 [email protected] 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

VinSpee avatar Nov 19 '15 00:11 VinSpee

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.

ghost avatar Jun 01 '16 22:06 ghost