Live data from Hacker News

Less.js will obsolete CSS

fadeyev.net

51–60 of 131 posts

Re: Less.js will obsolete CSS

#51
post #22
post #18

Earlier quoted context omitted.

> are the benefits good enough to warrant depending on an additional javascript library for something like this? What happens if people block javascript? Nothing, in production you'd use the compiled ver. The article should make this clearer though.

That depends. The "new" version they talk about in the article does require Javascript, since it does on-the-fly compiling. For the current version you're right.

I understand the thing they just released allows on-the-fly compiling. I'm just suggesting is that since the existing options remain available, you can still use them.

Re: Less.js will obsolete CSS

#52
I've tried css-dryer, which is similar in concept to server side LESS and SASS. I found it to be problematic on a large project because even though the CSS was compact in its source form, what actually got compiled ended up getting huge. It was slow to download and inefficient for the browser to process. The brevity of the source language ended up being an invitation to use CSS in a style was extremely verbose upon compilation. It also added operational complexity to have to deal with compiling the css. For example we wanted to use CSS in some of our javascript tests and then we had to deal with running the dryer from the test server. We eventually ripped it out at fairly great cost and went back to vanilla css, where it was clear to everyone what everything meant and we didn't have to worry about a huge inflation of the code. Maybe there's something smarter about these frameworks that avoids these issues?

Re: Less.js will obsolete CSS

#53
post #4

Literally the only problem with CSS itself is that it doesn't have defines. Every other problem is just browser implementations.

There are plenty of problems with CSS. You can't specify the width of an inline element, for one. That alone prevents a lot of reasonable layouts, like tables. Also problematic is a standards body that ignores this use case! In this case, they protect the writer from over-filling some boxes with more boxes. But that would at least be visible - in this case, the workarounds end up far worse.

Re: Less.js will obsolete CSS

#54

I can see it being somewhat useful as a server-side technology or as an authoring tool that you can then "compile" to CSS. CSS is so straightforward and simple to use as-is, however, that I don't really think it needs something to make it even easier, although the support for variables is quite nice. Having said that, I have the same problem with LESS.js that I have with various other JavaScript layout techniques - I…

CSS is far from easy to use correctly. CSS is very poorly designed. Aside from all the browser hacks it's core constructs often times contradict each other (think float vs position). We do need something better but I'm not sure if LESS is it. I would much rather see something built into browsers directly.

Re: Less.js will obsolete CSS

#55
post #13

Sensationalist link-bait headlines have no place here IMHO.

59 points and (at the time of writing) top post would indicate some disagree

It's interesting looking at his code (http://github.com/cloudhead/less.js/blob/master/dist/less-1....). It's clear, well described, and ambitious.

Re: Less.js will obsolete CSS

#56
Sensationalist headline but I can't wait to try this. When you start representing everything as JSON trees, web programming gets so much more consistent, compact, and easier.

Also see:

MongoDB - save data in BSON (binary JSON) And query with JSON

Node.js - Build an entire smoking fast server side web app with JavaScript objects. Bonus: run a node app on Heroku to compile and varnish cash less.js if you are worried about performance

Mustache.js or Pure - JavaScript templating to turn JSON into HTML

V8, tracemonkey, Nitro - blazing fast JS interpreters everywhere that will .eval JSON

Convergence anyone?

Re: Less.js will obsolete CSS

#57
post #50
post #35

Earlier quoted context omitted.

Says who? http://www.merriam-webster.com/dictionary/obsoleted http://en.wiktionary.org/wiki/obsolete

MW adds practically any word that someone uses, ever. And Wiktionary? Come on. If you take a gander at WordNet or even OneLook (searches multiple dictionaries), you'll find that the majority list obsolete only as an adjective, including Webster's 1828. However, I concur that obsolesce would have been a better choice.

OED has it as a transitive verb, with usage going back to 1640.

Re: Less.js will obsolete CSS

#58
post #19

Earlier quoted context omitted.

The article makes it sound like the author expects in-browser processing to be the only way it'll be used: "Less.js is a JavaScript implementation of LESS that’s run by your web browser. As any JavaScript, you include a link to the script in your HTML, and…that’s that. LESS is now going to process LESS code so instead of including a link to a CSS file, you’ll include a link directly to your LESS code. That’s right, n…

I demand a benchmark. Saying that something is just false without numbers to back it up is not something I have high trust in, and is the start of the gossip that causes internet wars. First back it up with numbers, then we talk.

As it's cached, it's only the first load that will have the lag. I'd guess it will be quite small as well. If the CSS makes heavy use of mixins and the nesting ability then the lag may even be smaller than the time to transfer the compiled CSS.

Maybe.

Re: Less.js will obsolete CSS

#59
post #43
post #35

Earlier quoted context omitted.

Says who? http://www.merriam-webster.com/dictionary/obsoleted http://en.wiktionary.org/wiki/obsolete

Obsolete is a verb, but it is a poor choice. A better choice would be obsolesce, as in: "LESS.js will obsolesce CSS". This is because LESS.js won't obsolete CSS, but it may well start the industry on the path. Obsolete has a feeling of immediacy to it, and obsolesce has a feeling of lethargy or a gradual process which is why it's the better choice. It's an opinion, take it with a grain of salt. (BTW, I dislike MW bec…

  Obsolete is a verb, but it is a poor choice. A better
  choice would be obsolesce, as in: "LESS.js will 
  obsolesce CSS"
"Obsolete" is the correct word because it's a transitive verb (eg, [subject] obsoletes [object]), while obsolesce is an intransitive verb (eg, [subject] obsolesces).

Re: Less.js will obsolete CSS

#60
post #26
post #9

Earlier quoted context omitted.

I also have issues with the "box model." Judging by the popularity of grid layout systems like blueprint and 960 I think others also do. The box model is fine when you just need to "flow" things around things, like text around images, and typical blog designs, but when you develop complicated interfaces it really shows its limitations and costs many hours of frustrating effort.

Not sure if this is what you're referring to, but you can have a box model that includes padding and border in the width using CSS3: box-sizing: border-box with -ms- (IE8), -moz- and -webkit- prefixes. http://www.quirksmode.org/css/box.html

http://www.w3.org/TR/css3-box/
Post reply on HN