peteboere / css-crush

CSS preprocessor.
http://the-echoplex.net/csscrush
MIT License
537 stars 51 forks source link

Comparison with LESS and Sass syntax #56

Closed jslegers closed 10 years ago

jslegers commented 10 years ago

Along with Stylus, CSS Crush seems to be one of the underdogs in a world dominated by Sass and LESS. Yet, due to my familiarity with PHP, I personally would feel more comfortable to use a PHP based pre-processor like CSS Crush than the Ruby based Sass I've been using so far.

While I'm really interested in trying CSS Crush as an alternative for Sass, the biggest stumbling block for me to actually try it out is having to learn yet another new syntax to do something I already know how to do in Sass.

I think it would really help me as well as other people who've had some experience with Sass or LESS getting into the CSS Crush syntax if you added a comparison table to your documentation to explains how something people used to doing in Sass or LESS could be done with CSS Crush.

Note that at this moment, I'm still looking for the right pre-processor language to use for Cascade Framework 2. My current preference goes to Sass, but such a comparison table could effectively change my mind... making Cascade Framework 2 (as far as I know) the first open source CSS framework based on CSS Crush. This, I think, would help increase the exposure and improve the perception of both Cascade Framework 2 and CSS Crush.

peteboere commented 10 years ago

I did do a comparison document at one point based on the SASS/LESS compared gist: https://gist.github.com/chriseppstein/674726

It's a little out of date but it wouldn't take me long to update it and publish as a gist, I'll close this issue with a link when I'm done.

jslegers commented 10 years ago

Why not put it on the documentation website? That's where everyone will be looking. That's where I expect to find this info.

Anyway, I'm looking forward to your link. I'm really curious to get an overview of how your project's features compare with those of LESS and Sass.

peteboere commented 10 years ago

https://gist.github.com/peteboere/8419143

jslegers commented 10 years ago

I'm sorry, but this won't do for me. Your comparison is seriously lacking.

For example, one feature I really care for in SCSS is its placeholder technique :

INPUT :

%ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.foo {
  @extend %ellipsis;
  display: block;
}

.bar {
  @extend %ellipsis;
}
OUTPUT : 
.foo, .bar {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.foo {
  display: block;
}

Now, I did get from your documentation that CSS crush supports the same feature, but using the following syntax :

@abstract ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.foo {
  @extend ellipsis;
  display: block;
}

.bar {
  @extend ellipsis;
}

It is precisely that feature that made me seriously consider CSS crush an alternative to SCSS. If you don't even include such an important feature, it makes me wonder what else you left out... and along with your unwillingness to put this on your website, that makes me very reluctant to use CSS Crush...

It's a pity, though... CSS Crush looks promising, but (being an Open Source developer myself) I expect more engagement and/or better documentation from its developer...

peteboere commented 10 years ago

I'm sorry this is a disappointment to you but I have no time for writing (and maintaining) extensive comparisons with whatever tools this project may, or may not be comparable to.

jslegers commented 10 years ago

... which is probably one of the main reasons LESS and SCSS are more popular.

It's something I learnt myself the hard was as well. Even the most brilliant code is totally irrelevant until:

You can't achieve that without investing a painful amount of time writing documentation that developers of different backgrounds can pick up in a jiffy... and in my case (and I bet that of many others as well), it's such comparisons that make the difference.... as for me they significantly reduce the learning curve that comes with moving from one environment to another...

Anyway, it's your library. I can't force you to spend time on your documentation. I guess I'll have to stick with SCSS for the time being... although I hope you'll change your mind one day.

iby commented 10 years ago

@jslegers I guess one day you'll also learn about not being a dick about such things.

The hard will that be. Amen! :smile:

jslegers commented 10 years ago

@ianbytchek :

I just gave my opinion in the most constructive way I can imagine. I didn't intend to come off as rude. As I apparently did come off as rude (which does tend to happen whenever I engage in communication with my fellow humans), I apologize.

Still, I stand behind everything I said. I would have loved to use CSS Crush for PHP projects and help popularize it as an alternative for SCSS and LESS, but @peteboere 's totally uncooperative attitude pretty much forces me to ignore CSS Crush and go with a PHP implementation of SCSS ( https://github.com/leafo/scssphp ) instead.