modularscale / modularscale-sass

Modular scale calculator built into your Sass

Home Page:http://www.modularscale.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shorthand for unit output

VinSpee opened this issue · comments

In compass's vertical-rhythm module, you're required to provide values to vertical-rhythm's mixins in px. When using modular scale along side of vertical-rhythm, this becomes a pain, because every time you want to provide a horizontal value (margin, padding, etc), you must also specify a unit. Here's an example.

As a work-around, I've implemented an msem() function that converts values to ems. Any ideas on how to do this better?

So there are a few things of note here.

  1. $base-size conflicts with the $base-size variable in the Compass vertical rhythm module. In 2.0 this variable is changed to $ms-base to avoid this conflict and allow you to specify $base-size in pixels and $ms-base in whatever. Maybe resolving this variable conflict alone will solve your issue?
  2. You have two modes in play at the same time. Do you use px exclusively with vertical-rhythmn and ems everywhere else? Do you use px and em equally for lots different use cases throughout your stylesheet? If you use em most of the time why not set that as default? Or is vertical rhythm so widely used in your stylesheet that it is used just as frequently?
  3. Ems have unique properties, especially when it comes to modular scales. I can see creating a special function where everything has a base of 1em. I am trying to think of a way to more easily switch between two bases of your choosing and can’t think of an elegant solution. However if I do implement this the values will be different than the ones in your function.

@VinSpee @yodasw16 Please look at this and discuss here. I need to track this here, not Twitter.

Will do - I haven't had a chance to get back to it as I'm on my honeymoon, but I will as soon as I get back.

On Thu, Jan 2, 2014 at 11:38 AM, Scott Kellum notifications@github.com
wrote:

@VinSpee @yodasw16 Please look at this and discuss here. I need to track this here, not Twitter.

Reply to this email directly or view it on GitHub:
#67 (comment)

@VinSpee ah, happy honeymoon!

@VinSpee Hope your honeymoon went/is well. Just want to bump this thread as we are getting closer and closer to release. @yodasw16

Coming home tomorrow - I'll get on this as soon as I'm back in gear!

On Sun, Jan 12, 2014 at 8:30 AM, Scott Kellum notifications@github.com
wrote:

@VinSpee Hope your honeymoon went/is well. Just want to bump this thread as we are getting closer and closer to release. @yodasw16

Reply to this email directly or view it on GitHub:
#67 (comment)

I think this might actually be an issue to file with vertical rhythm in compass instead of here. You already have the ability to set em or px in modular scale. The problem is that VR requires a pixel input. That's my thoughts anyway.

Should let @VinSpee chime in before closing this, but I think we are on the same page.

Yeah after considering this one pretty seriously, i think the only real fix is to change Compass's Vertical Rhythm module. Sorry for the noise.