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

STYLE_ constants obeyed #15

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

STYLE_ constants obeyed #15

jamierumbelow opened this issue May 1, 2012 · 18 comments

Comments

@jamierumbelow
Copy link

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
Copy link

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.

@HamptonMakes
Copy link
Member

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:
#15

@MrBenGriffin
Copy link

We also would like to see compressed!

@akhleung
Copy link

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

@akhleung
Copy link

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

@paramdhal
Copy link

Not working for me. Getting an empty output

@akhleung
Copy link

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

@paramdhal
Copy link

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

@akhleung
Copy link

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.

@craigbarnes
Copy link
Contributor

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

@akhleung
Copy link

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!

@paramdhal
Copy link

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

@akhleung
Copy link

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.

@paramdhal
Copy link

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

@akhleung
Copy link

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

@paramdhal
Copy link

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

@am11
Copy link
Contributor

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.

HamptonMakes pushed a commit that referenced this issue Oct 2, 2014
@HamptonMakes
Copy link
Member

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.

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

No branches or pull requests

7 participants