mgreter/sass2scss

Require a space after a colon

Closed this issue · 3 comments

Seems that the current behaviour of Ruby Sass vs libSass/sass2scss is different in regards requiring a space after a colon :.

For example a valid syntax in both:

.very-secret
  display: none

Invalid in Ruby Sass, while libSass via sass2scss accepts:

.very-secret
  display:none

You found a very subtle difference in how sass2scss and ruby sass interpret the syntax. As I've written somewhere, the specifications are pretty open on these details. This stackoverflow post shows the difference. Looks like I've added too much compatibility and I'm not sure if it should be taken out. I'm currently in favor of leaving it that way, until someone reports a case where sass2scss does something wrong. Although libsass tries to be as close to ruby sass as possible.

Currently sass2scss does not throw any errors, so I would not really know how sass2scss should report that error, since libsass will parse it happily once it is converted ...

@akhleung, @hcatlin @paazmaya:
Any objections or opinions?

Perhaps it could write a warning/notice somewhere but still keep processing and push the Scss out as it currently does.
This is just something that I came across when using libSass for development (need for speed) and Ruby Sass with CI.

Closed since this issue is about something that is handled correctly in sass2scss but not in ruby sass. Mainly because sass2scss does not have any error reporting to libsass (should it throw an error or just write to stderr/stdout?).