News for hackers. Stuff that matters.
Re:Why I don’t use CSS preprocessors by usaphp on Saturday April 02, 2016 @04:22AM (#11410732)
To me this just shows his lack of experience working with a big project where using things like variables and scoping things helps a lot. And what about mixins? To me they are a great tool to fight code duplication, especially once you start dealing with responsiveness for multiple hundred of elements and need to generate similar styling based on dimentions of a screen, I can't imaging maintaining a big site using regular css, it would be a nightmare.
Re:Why I don’t use CSS preprocessors by BinaryIdiot on Saturday April 02, 2016 @04:38AM (#11410759)
> To me this just shows his lack of experience working with a big project where using things like variables and scoping things helps a lot.

Honestly depends on how you structure the HTML and CSS. I've worked on some very, very large projects stretching across 15 subcontractors and we did not use css preprocessors. It wasn't even an issue really.

CSS is really great at cascading properly. Most of the times I've seen where people want to use variables could have been just as easily accomplished via inheriting from a top level style.

But I'm not going to sit here and tell you you're an idiot for using CSS preprocessors. They serve a purpose. They work. Yes they complicate things further but if it helps you deliver faster I'm not going to complain...much :)

Re:Why I don’t use CSS preprocessors by nailer on Saturday April 02, 2016 @05:59AM (#11410941)
The general approach without using mixins is creating visual classes, which now means the look of say .login-box is determined in two places : the HTML where .login-box has visual classes added and the CSS for .login-box and whatever the visual classes are.
Re:Why I don’t use CSS preprocessors by Akkuma on Saturday April 02, 2016 @10:32AM (#11411644)
I'm hard pressed to believe the quality of the CSS across 15 subcontractors was actually good and consistent. You can't get 5 developers in a room without finding at least a few differences in opinion how something could or should be done and when it comes to CSS you have even more flexibility to how you're writing it and the associated markup.

What was done to ensure similarity of HTML/CSS across such a large project?

Re:Why I don’t use CSS preprocessors by BinaryIdiot on Saturday April 02, 2016 @12:48PM (#11412175)
> I'm hard pressed to believe the quality of the CSS across 15 subcontractors was actually good and consistent. You can't get 5 developers in a room without finding at least a few differences in opinion how something could or should be done and when it comes to CSS you have even more flexibility to how you're writing it and the associated markup.

Quality across more than 1 subcontractor for ANYTHING is rarely good. But the most important thing when dealing with large projects divided with multiple groups? Ownership. You make one group own the design / CSS. Then when others change their CSS it runs through them for reviews but they also supply guidelines for being consistent, etc.

It's almost impossible to handle disparate groups without having centralized owners and people who create guidelines on how to do everything so it's consistent.

Re:Why I don’t use CSS preprocessors by wallacoloo on Saturday April 02, 2016 @04:58AM (#11410812)
> I can't imaging maintaining a big site using regular css

It wasn't that long ago that nobody used [the current big-name] CSS preprocessors. But site admins got along fine, and I certainly didn't hear many complaints.

To each their own, but I don't find maintaining a big site with 'regular' css unimaginable.

Re:Why I don’t use CSS preprocessors by viraptor on Saturday April 02, 2016 @05:10AM (#11410840)
> But site admins got along fine

Apart from those who generated css dynamically. And those who hated the situation enough to create preprocessors to improve their lives.

"Before X people were ok without X" is a tautology.

Re:Why I don’t use CSS preprocessors by coldtea on Saturday April 02, 2016 @12:33PM (#11412121)
>"Before X people were ok without X" is a tautology.

No, it's not.

Sometimes new techniques appear without anybody feeling there was a problem in the first place.

Other times they appear after people struggle and curse their way without them.

"Before X people were ok without X" only refers to the first case, so it's not a tautology applicable to all cases before X.

E.g. people always struggled with webpage layout, and knew they needed a solution X to appear, even before an X emerged.

Re:Why I don’t use CSS preprocessors by sangnoir on Saturday April 02, 2016 @05:27AM (#11410872)
> But site admins got along fine, and I certainly didn't hear many complaints.

Using tables for layouts was once state of the art as well with no complaints. Things change, as do best practices. You can use inheritance to reuse values without preprocessors, or you can switch to preprocessors and use variables and mixins for composition. The question of which is better (inheritance vs. composition) is a personal one, I prefer composition.

Re:Why I don’t use CSS preprocessors by Lazare on Saturday April 02, 2016 @05:21AM (#11410861)
> It wasn't that long ago that nobody used [the current big-name] CSS preprocessors. But site admins got along fine, and I certainly didn't hear many complaints.

If life was fine without preprocessors, then why did they see such rapid adoption?

Re:Why I don’t use CSS preprocessors by sgift on Saturday April 02, 2016 @06:05AM (#11410956)
Why did NoSQL, programming language of the week, etc. see such rapid adoption before they died out again / moved back to their specialist niches? Shiny new toys, everyone loves them. For a while.
Re:Why I don’t use CSS preprocessors by lowmess on Saturday April 02, 2016 @06:52AM (#11411049)
Sass is nearly 10 years old. LESS first appeared in 2009. This is beyond shiny; these are mature, well-supported tools.
Re:Why I don’t use CSS preprocessors by wallacoloo on Saturday April 02, 2016 @06:18PM (#11413781)
I think my point was missed by most of the replies to this comment. That's likely my fault - I should have been more explicit:

I'm not arguing for or against CSS preprocessors here. I'm trying to point out that one shouldn't have difficulty imagining coding a site with regular css. It's every bit doable, it has been done widely in the past and it is in fact still done today.

In some cases - perhaps many - it's not ideal, sure. But when OP says that not using these tools is unimaginable, I see that as a lack of effort on his/her part into trying to understand the point of view of the people who don't use them.

If I was a LESS user and somebody said, "I can't imagine a case where you'd want that tool", I would scoff at them because there are plenty of examples out there (and in this thread), and their statement shows that they're really not even trying to understand my point of view.

If they instead said, "I can understand why you think you need that tool, but ..." then I wouldn't have a problem because they have made an effort into understanding my point of view (and they can at least imagine using my workflow in their head, even if they don't like the idea).

This may be pedantic - after reading OP's post again, it seems possible that OP wasn't being literal about the imagination thing. But that didn't occur to me at the time of writing.

Re:Why I don’t use CSS preprocessors by agnivade on Saturday April 02, 2016 @05:02AM (#11410824)
I don't think that is OP's point here. Just because something works doesn't mean you should not improve it. You might get habituated with regular css. But things improve SO much when you use pre-processors.
Re:Why I don’t use CSS preprocessors by toomanythings2 on Saturday April 02, 2016 @09:45AM (#11411484)
The author has been a well known, though low key, source since I began in 2004 and I've been following him since. His about page says he's been developing for the web since it began so, no, he does not lack experience.
Re:Why I don’t use CSS preprocessors by bphogan on Saturday April 02, 2016 @11:54AM (#11411947)
I've also been doing things on the web since 1995.

Don't measure experience by how long someone's done things. Measure it by what they've done. It's that old quote about "10 years of experience, or one year of experience repeated 10 years."

I've also been following this individual. I don't tend to agree too much with what he has to say because my experiences are very different.

I met a dev at a meetup the other night as I was giving a talk on Elm. He's been doing web dev almost as long as me. He still does HTML with tables. He uses inline CSS. He's never investigated a preprocessor, and has never looked at Angular, Backbone, or React.

But he's successful, so, shrug.

So be wary of "appeal to authority" arguments. Yes, he's been around a long time. Doesn't mean he's right.

None of us are really right. Just weigh all the opinions and decide based on experience.

I'm too old and tired now to try to convince people I'm right and they're wrong. I'm more interested in saying "I think this is cool and here's why."

For the record, I think Elm is the future and you can pry Sass from my cold, dead hands. Those are just my opinions, and they may change. It doesn't mean anyone who uses jQuery and straight CSS is wrong.

Re:Why I don’t use CSS preprocessors by toomanythings2 on Saturday April 02, 2016 @10:32PM (#11414643)
Nothing you said matters cause it has nothing to do with what I was replying to. I was replying to the statement that he "lacks experience" and that is far from the truth.
Re:Why I don’t use CSS preprocessors by websitescenes on Saturday April 02, 2016 @10:20AM (#11411596)
Experience seems to be what's holding him back in this case. I've always done it this way soo... As developers and engineers, we have to be ready to change our assumptions and workflows to adapt to new technology.
Re:Why I don’t use CSS preprocessors by coldtea on Saturday April 02, 2016 @12:29PM (#11412114)
>Experience seems to be what's holding him back in this case.

We can only say that it's "holding him back" only if we can show that he doesn't get the same results as SASS users, in the same amount of time.

Re:Why I don’t use CSS preprocessors by websitescenes on Saturday April 02, 2016 @01:16PM (#11412292)
They are not same results. One code base is monolithic and hard to maintain while the other is modular and simple to update and maintain.
Re:Why I don’t use CSS preprocessors by coldtea on Saturday April 02, 2016 @02:02PM (#11412505)
This critique presupposes what it was meant to prove.
Re:Why I don’t use CSS preprocessors by websitescenes on Saturday April 02, 2016 @02:36PM (#11412679)
There is no argument. Simple facts. Plain CSS is monolithic and hard to maintain. Disprove it if you want but I think you'll be hard pressed. This author did not succeed.
Re:Why I don’t use CSS preprocessors by toomanythings2 on Saturday April 02, 2016 @10:35PM (#11414650)
You presume that he needs to change but give no reason to do so other than you think your way is better. He says his is better and a lot of people, including myself and a well-publicized recent article, feel the same way.

We think your path is the wrong way and will cause you problems as time goes on.

Re:Why I don’t use CSS preprocessors by websitescenes on Tuesday April 05, 2016 @10:45AM (#11430758)
Speed, maintainability, modularity and readability are all good reasons. I'm sure that there are many more reasons but these are just off the top of my head.
Re:Why I don’t use CSS preprocessors by olavgg on Saturday April 02, 2016 @06:25AM (#11410996)
I've written CSS for over 10 years, and I don't use preprocessors at all. I've written small web pages, e-commerce sites, enterprise applications with tens of thousand users. And I find it really offending that you think this is because of lack of experience.

I don't care about mixins, variables, a few instances of duplicated code and my clients doesn't care about any of the code under the hood. In fact they care about time to market, and that is something I am exceptionally good at in my area.

In fact variables has always been possible with multiple class names.

The discussion about what we should choose between traditional CSS, SASS and LESS is on the same level as what color the bike shed should have. http://bikeshed.com/

Pick one and be happy, neither is better or worse. When you're building web applications, CSS is least of your problems.