-
Notifications
You must be signed in to change notification settings - Fork 463
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 files not supported? #16
Comments
We have no plans to support meaningful white space with libsass. Will accept a super well tested patch if you are passionate. Complex enough to get the more popular form working.
On May 4, 2012, at 3:54 PM, Donald [email protected] wrote:
|
Sad. Understandable though. Thanks! |
Seems to me that whitespace can be supported by a preprocessing step that converts indents and outdents to curly braces and adds semicolons. shouldn't actually be that complicated. |
What about mixins and stuff? We'd happily support this if its doable! On Sat, May 5, 2012 at 9:23 AM, Chris Eppstein <
|
Good point. Anyways, this can be done with a simplified parser, the differences are always the first token of the line. |
Sorry I didn't chime in sooner; I was on vacation. Anyway, I would like to support the indented syntax eventually -- as Chris mentioned, this may be as simple as swapping the tokenizer, but that will require a little bit of refactoring (which I was planning to do anyway). |
+1 on the |
I think this may be a major factor in the adoption of libsass by non-Ruby shops, and libsass is obviously the future of Sass. |
+1 Our shop writes entirely in .sass format. Let me know if we can help implement this. |
Currently the parser and scanner are pretty tightly coupled, so adding support for the indented syntax would be complicated. I am planning to eventually decouple the scanner and parser; once that happens, it should be relatively straightforward to write a new scanner that keeps track of indentation, and swap it in when handling .sass files. |
+1 for this 👍 |
Support for .sass would be great. |
+1 |
+1 |
+1 Also I'd be happy to pay a little if there would be a kick-starter like thing. |
+1, and +1 for the Kickstarter like thing too. |
Hopefully this helps a little, thanks to all the contributors for the work on libsass so far. |
+1 for .sass |
👍 for |
+1 |
I have a hack script which converts sass syntax into scss by adding "{}" . On Mon, Dec 16, 2013 at 5:16 PM, Ilan Frumer [email protected]:
|
Yes, Thanks a lot. |
👍 for |
I have implemented script which converts indented script to braces. It works for me. You can get it here. And by the way you can propose your variant. |
+1 |
I implemented a perl script to convert indented sass syntax to scss: Best regards |
@askucher Does this way support the shorthand way of declaring mixins (=) and including mixins (+). From the version of the script I saw, it didn't seem like it did. |
I've added an implementation with tests to my other pending pull request #181. |
@akhleung has merged my changes into the master branch. So libsass should now be able to handle (convert) indented sass files (and also support the previous c interface correctly). But until some of you people that gave a plus 1 take the effort to verifiy it via SassC or CSS::Sass, this Ticket will stay open. Btw, If I do get the bounty, I want to put it forward to #281. For the record: my implementation will only handle indented sass files if the filename ends with .sass. There is no way, if you load the content yourself and pass it to libsass, to tell that libsass should treat it as indented syntax. But you can convert it via sass2scss yourself beforehand! |
Since no one has complained, I'm going to assume that this is working for people. |
Does this work? I'm unable to get any of the examples on http://sass-lang.com/guide to work with the Sass versions. https://gist.github.com/drewwells/86f147c30c20dcfea610 Ahh, I see that comments above that this only works with files. |
@drewwells, you need to rename your file extension to .sass not .scss |
Given the test.sass file:
div
background-color: blue
when I run "./bin/sassc test.sass" I get the error:
ERROR -- test.sass, line 1: invalid top-level expression
Is there a flag I'm missing, or is sass not supported yet? Significant whitespace is awesome.
The text was updated successfully, but these errors were encountered: