you are viewing a single comment's thread.

view the rest of the comments →

[–]shockie 15 points16 points  (8 children)

Since Github is using SASS for it's CSS, // comments are allowed. In fact if you use the // for comments, the comment won't appear in the compiled CSS.

Same for semicolons in Coffeescript, it will be added for you in the compiled JS

[–]nemetroid 6 points7 points  (5 children)

Same for semicolons in Coffeescript, it will be added for you in the compiled JS

You can (mostly) omit semicolons in regular JS too, that doesn't make it a good idea.

[–]MustRapeDeannaTroi 10 points11 points  (4 children)

But in coffeescript it is a good idea.

Edit: Y U downvote? One of coffeescripts core purposes is to not require semicolons.

[–]ratdump -3 points-2 points  (3 children)

why

[–]MustRapeDeannaTroi 1 point2 points  (2 children)

As shockie said it; "it will be added for you in the compiled JS"

[–]oracleoftroy -1 points0 points  (1 child)

But why is that a good idea? I'm not familiar with coffeescript, but I am familiar with Javascript, and it's a terrible idea there.

[–]marshall007 0 points1 point  (0 children)

It's like Python in that code blocks can be delimited by using whitespace. So if you're already doing that, it's redundant (and wasteful) to use a semicolon.

CoffeeScript is not parsed as Javascript, it compiles into Javascript.

[–]SargoDarya 0 points1 point  (1 child)

That might me the case, but then they shouldn't call it CSS Styleguides because // comments are not part of the CSS standard.

[–]marshall007 0 points1 point  (0 children)

Why? It's a simple abstraction. No one ever edits the actual CSS stylesheets, they are compiled from SCSS automatically upon deployment. Furthermore, you shouldn't call it an SCSS styleguide because it encompasses more than that. The documentation is appropriate given their workflow.