Menu icon Foundation
Styles work with Libsass but not the Ruby compiler

Hi,

I am using Codekit and I had to switch to Libsass, which doesn't work with Compass, from the official Ruby compiler because of an issue I was having. The issue seems to be fixed by a new version of Codekit, so I decided to switch back to the Ruby compiler, but some of my styles have changed.

For example, I made this class for a blue button. With Libsass it works, but with the Ruby compiler, the styles don't take.

.button--blue{
  background: $dark-blue;
  &:hover,
  &:focus { background-color: scale-color($dark-blue, $lightness: $button-function-factor) }
}

Could someone explain to me why this might be? Or what I might be fundamentally misunderstanding about taking this approach?

Thanks!

libsassrubycodekit

Hi,

I am using Codekit and I had to switch to Libsass, which doesn't work with Compass, from the official Ruby compiler because of an issue I was having. The issue seems to be fixed by a new version of Codekit, so I decided to switch back to the Ruby compiler, but some of my styles have changed.

For example, I made this class for a blue button. With Libsass it works, but with the Ruby compiler, the styles don't take.

.button--blue{
  background: $dark-blue;
  &:hover,
  &:focus { background-color: scale-color($dark-blue, $lightness: $button-function-factor) }
}

Could someone explain to me why this might be? Or what I might be fundamentally misunderstanding about taking this approach?

Thanks!

Swaranan Singha Barman almost 5 years ago

You can use grunt for compile..it works with libsass...
here the article for installation of grunt...
http://foundation.zurb.com/forum/posts/11597-how-to-install-grunt-and-libsass-on-windows

Hans McMurdy almost 5 years ago

I'm not sure why this occurs and am curious myself...
However I would definitely recommend the post @Swaranan mentioned it helped me out alot and personally I found Codekit to be buggy and lacked customization for build options.

if you want a good example (simple) with grunt check out this repo:
https://github.com/HansUXdev/foundation-setup

Brett Peary almost 5 years ago

Thanks for the replies.

I'm going to stick with Codekit for the moment, but I will check out your link, Hans, for the future.

Swaranan, I have a Mac so the link won't work for me but I take your point.

For anyone else, I would like to know why this might occur, if anyone else knows.

Cheers,

Brett