4 ms·
'Having more features doesn't force them to be used' — correct, but it changes the perception people have of the tool, as well as what they start to expect from
by cloudhead 17y ago
'Having more features doesn't force them to be used' — correct, but it changes the perception people have of the tool, as well as what they start to expect from it.
I personally favor smaller tools which do the least amount possible while still fulfilling your needs. That's why, for example, I'm not a huge fan of Rails, and would much rather use Sinatra when I can. I know I'm not the only one.
It's this sort of overhead I'm trying to avoid. Less is very straightforward, and I want to keep it that way—there's not much you need to learn to start using it, and the code base is tiny. For most use cases I think the feature-set will be more than enough, and if it's not, we have Compass.
- chriseppstein 17y agoYou're still confusing sass and compass. Like I said, your current feature set is ample for the 95% use case of normal web development. To that end, we are in complete agreement. I don't know how familiar you are with blueprint, but the less syntax doesn't support creating new abstractions that simplify design. In sass using the compass port of blueprint we can do this: #sidebar +column(8) which generates: #sidebar { float: left; margin-right: 10px; width: 310px; } The column mixin is defined here: http://github.com/chriseppstein/compass/blob/master/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass#L101 http://github.com/chriseppstein/compass/blob/master/framewor... So what could be the equivalent less syntax for this? div#sidebar { .column: 8; } This is wonderfully easy for end users, but the language syntax has to become more complicated to support it. You have to be able to specify the arguments for the mixin. Also, you need a way to refer to the parent selector within the mixin abstractly. In sass we use the & symbol to represent the selector's context. I don't know what a "css-like" syntax would be for these capabilities. I would argue that they don't really have to be that "css-y", but they just have to play nicely with existing CSS syntax, because normal users don't need them. Anyways, it's your project... But I've spent the last year thinking about these sorts of issues. If you want to discuss further, you can hit me up on github. -chris
- 9oliYQjP 17y agoI think you made the right call. CSS isn't complex enough to need a framework. In a lot of cases, CSS frameworks abuse the primary motivating factor for trying to separate style and content in the first place. If I have to use particular HTML markup or class naming conventions, I may as well just forego the separation of content and style altogether and use table layouts. But less appears to make desperately needed additions that should ultimately show up in CSS itself IMHO. Certainly when I was first picking up CSS -- given my programming background -- I was reaching for the concept of variables and in fact was surprised that they did not exist in CSS. For that reason, I'd consider less to be more of a language extension than a framework.
- chriseppstein 17y agoYou don't know about compass then. Go watch the screencast. CSS isn't complex, but building websites that work correctly in 8 web browsers most certainly is. Compass frameworks give you re-use without semantic fail.
- Keyframe 17y agoI've just started using sass/compass for a project and I can tell I am more productive than ever, though I am using 960.gs instead of blueprint with compass. I am using compass for sass/960 and staticmatic for haml - so I can output a set of html/css files which are used in my php project. I am loving it, especially since staticmatic has preview mode and compass has --watch mode - so I have both running and auto updating my preview while I work on it. Even if I didn't use haml at all and no framework (960), it would still make sense for sass variables and mixins with input variables alone. building sites that work across browsers is easier with reset+some framework, but I still have to have IE7+ specific css, and compass seems a bit moody on windows. edit: I am not sure if I would be comfortable using anything external to css to output css that has the same syntax, like less seems to have - it would most likely pollute my way of thinking down the road.
- 9oliYQjP 17y agoI do know about compass, but I have a feeling compass will be to less what Prototype is to jQuery, at least for me. When I first learned Prototype I thought it was awesome, but jQuery just ended up making a whole lot more sense to me. Different strokes for different folks I suppose.
- carbon8 17y agoWhat you are describing would be closer to Sass vs Less, not Compass vs Less. Compass is a meta-framework built on Sass to make working with CSS frameworks much simpler, easier, cleaner and more flexible. In your case, you don't use CSS frameworks at all, but you just want a few features that aren't in CSS, so Compass isn't what you'd be considering, Less or Sass would be.