modularscale / modularscale-sass

Modular scale calculator built into your Sass
http://www.modularscale.com
MIT License
1.98k stars 133 forks source link

Using ems instead of pixels #52

Closed ottobyte closed 11 years ago

ottobyte commented 11 years ago

Hi, I want to output ems instead of pixels. I've tried setting $base-size: 1em however Compass doesn't like this.

scottkellum commented 11 years ago

Should work fine, I use ems all the time: http://sassmeister.com/gist/6082041

ottobyte commented 11 years ago

Thanks for that, that seems to work!

On 29 Jul 2013, at 12:49, Scott Kellum notifications@github.com wrote:

Should work fine, I use ems all the time: http://sassmeister.com/gist/6082041

— Reply to this email directly or view it on GitHub.

ottobyte commented 11 years ago

Sorry, yes it works in that instance, I have been attempting to use it like this '+adjust-font-size-to( ms(2) , 2 ), I'm getting error sass/style.sass (Line 99 of _vertical_rhythm.scss: 0.265em*em/px isn't a valid CSS value.) as a result. Does modular-scale not work with Compass this way?

Many thanks Scott

scottkellum commented 11 years ago

ah, yeah vertical rhythm only works with px. It’s an issue with the vertical rhythm module in Compass, not an issue with Modular Scale.

Hopefully they will get it to work with ems although vertical rhythm tends to work better in pixels. I don’t usually use Compass vertical rhythm so I don’t really bother with.

ottobyte commented 11 years ago

Right I'm with you, thanks a lot for clearing that one up Scott,

Would you say just directly using the ms() functions directly on the font-size, margins etc is the way to go?

On 29 Jul 2013, at 15:38, Scott Kellum notifications@github.com wrote:

ah, yeah vertical rhythm only works with px. It’s an issue with the vertical rhythm module in Compass, not an issue with Modular Scale.

Hopefully they will get it to work with ems although vertical rhythm tends to work better in pixels. I don’t usually use Compass vertical rhythm so I don’t really bother with.

— Reply to this email directly or view it on GitHub.

scottkellum commented 11 years ago

@ottobyte Yes! I use ms() everywhere in my personal projects. Breakpoints, margins, everywhere.