SassyStudio icon indicating copy to clipboard operation
SassyStudio copied to clipboard

SASS 3.3 map type

Open HerbCaudill opened this issue 11 years ago • 4 comments
trafficstars

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.

HerbCaudill avatar Mar 29 '14 16:03 HerbCaudill

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)

darrenkopp avatar Mar 29 '14 17:03 darrenkopp

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.

itanex avatar Jun 12 '14 22:06 itanex

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.

darrenkopp avatar Jun 12 '14 22:06 darrenkopp

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

itanex avatar Jun 12 '14 22:06 itanex