Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SASS 3.3 map type #58

Open
HerbCaudill opened this issue Mar 29, 2014 · 4 comments
Open

SASS 3.3 map type #58

HerbCaudill opened this issue Mar 29, 2014 · 4 comments

Comments

@HerbCaudill
Copy link

Would love to see support for SASS 3.3 map types and @each support.

A map:

$BackgroundColors: (
    Blue: $Blue,
    Orange: $Orange,
    Khaki: $Khaki,
    Gray: $Gray,
    Red: $Red,
    Green: $Green
}

then:

@each $BackgroundColorName, $BackgroundColor in $BackgroundColors {

    .#{$BackgroundColorName} {
        background: #{$BackgroundColor};
    } 

    div.Widget.#{$BackgroundColorName} {
        border-color:#{$BackgroundColor};
    }

}

... which would produce

    .Blue {
        background: #0000FF;
    } 

    div.Widget.Blue {
        border-color:#0000FF;
    }

    // ...etc

See here for another example.

@darrenkopp
Copy link
Owner

So, there's two parts to this: the sassy studio side and the compiler side.

The sassy studio doesn't support this yet, but it works reasonably well right now.

On the compiler side, only 1 of the 3 compilers that sassy studio supports works and that is the sass gem compiler. The default one, libsass, hasn't been updated yet for 3.3. You can use the sass gem compiler though if you want to use this right away, it just requires a small bit of additional configuration (install ruby, put ruby install path into sassy studio options, then add a config.rb file)

@itanex
Copy link

itanex commented Jun 12, 2014

What can I do to help move libsass forward to support this feature? The majority of work that my contract covers is going to need to have this support, I can figure out how to get sass gem compiler and ruby running, but the rest of the people its going to take time to move into this support. If there was a way for me to bump the appropriate request I will do that.

Thanks.

@darrenkopp
Copy link
Owner

You'd have to talk to the folks on the libsass project, I don't control their development pace. However, as soon as it lands in libsass, I can pull in the changes to libsass-net and release in about 5 minutes.

@itanex
Copy link

itanex commented Jun 12, 2014

Thanks, I will go bumping over to that project and see what I can get.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants