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

Already on GitHub? Sign in to your account

STYLE_ constants obeyed #15

Closed
jamierumbelow opened this Issue May 1, 2012 · 18 comments

Comments

Projects
None yet
7 participants

I got all excited about adding different output styles to my libsass binding to discover that only SASS_STYLE_NESTED is working!

Are there still plans to make the other style constants work?

akhleung commented May 1, 2012

Yes, all the output styles will be implemented. It's currently a low priority compared to other features such as full interpolation and selector inheritance.

Owner

hcatlin commented May 1, 2012

Awww, we didn't mean to ruin your excitement.

On Tue, May 1, 2012 at 6:05 AM, Jamie Rumbelow <
reply@reply.github.com

wrote:

I got all excited about adding different output styles to my libsass
binding to discover that only SASS_STYLE_NESTED is working!

Are there still plans to make the other style constants work?


Reply to this email directly or view it on GitHub:
hcatlin#15

We also would like to see compressed!

I'll be getting this feature in by the end of the month!

Added support for compressed output styles. Please give it a try!

Not working for me. Getting an empty output

Can you provide more details on how you're invoking LibSass? It's been working for us.

Using SassC
as in
./bin/sassc [input file]

Oh, the SassC command-line tool is still hard-coded to use the nested style (haven't had time to update that yet!). To use the compressed style, you currently have to set the flag in the C interface when invoking LibSass as a library.

Contributor

craigbarnes commented Nov 19, 2012

I'm just working on sassc flag handling now. Is it ok to use getopt or does it need to be Windows friendly?

Hmm ... preferably Windows-friendly, but that's less of a priority than keeping the core library itself portable. So I'd say go ahead and use getopt if it makes things much easier and more robust. Thanks for the help!

Sorry if i being a bit dense - dont have much experience with C

Changed the sassc.c file line 16 to ctx->options.output_style = SASS_STYLE_COMPRESSED;

Then ran make

Output is now empty

Have you updated the libsass submodule? Try going into the libsass subfolder and run git pull. Then back out and do a make clean and make.

That did it! Thanks for the help...
Seems to be working well

No problem! And let me know if the styles don't look right!

Will be testing tomorrow. Ill let you know if there any problems!

Member

am11 commented Jun 9, 2014

Isn't expanded and nested somewhat redundant?

Supposedly, nested produces the following output:

a > b > c {
    declaration }
    a > b > c > d {
        declaration1;
         declaration2; }

and the expanded is supposed to be:

a > b > c
{
    declaration;
}

a > b > c > d
{
    declaration1;
     declaration2;
}

Then there might be a requirement which begs another kind of nested expansion:

a > b > c
{
    declaration;
}

    a > b > c > d
    {
        declaration1;
        declaration2;
    }

So, wouldn't it make sense to have just two styles: expanded (which is nested-expansion; unobtrusive, well-formatted and nested) and compact (minified flavor)? Perhaps, expanded can be aided by another option --indent, which is the base indentation in case of multi-nesting (normally its 2 or 4).

On a related note, both kind of outputs should get the _detailed_ source maps pinpointing the location for each source-to-source artifacts (exactly how lessc does it), as opposed to the mere hints -- not capturing the details to full extent / depriving consumers of implementing some extraordinary features. See #324.

@hcatlin hcatlin pushed a commit that referenced this issue Oct 2, 2014

@mgreter mgreter Merge pull request #15 from hcatlin/master
MIT License
1a3df0d
Owner

hcatlin commented Oct 3, 2014

We are trying to match the styles produced by the Ruby implementation. I'm going to close this since the issue is actually about the constants, not compatibility with Ruby sass.

@hcatlin hcatlin closed this Oct 3, 2014

@MrLoh MrLoh referenced this issue in jasonsanjose/brackets-sass Nov 1, 2014

Closed

Filter Function Conflict #48

@anlutro anlutro pushed a commit to alprs/libsass that referenced this issue Feb 2, 2015

Aaron Leung Merge pull request #15 from rmariuzzo/patch-1
Update README.md
ee17604
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment