Barney (anyone interested in the subject),

I understand you’re passionate and are familiar with the subject, so I
simply caution to brush away preprocessor-skeptic advice, and to
underestimate traditional code optimization.

CSS optimization is a complex issue. The example I gave is powerful
because it shows how a fantastically effective technique is difficult
to be employed automatically (to my knowledge no preprocessor has even
tried, for good reasons): “using every declaration just once” changes
the order of rules, and can have undesired side-effects if applied
blindly. (I’m coming from a career of exploiting style sheets.)

However, it’s just *one* technique. The point is that there are more
such techniques. I don’t think we identified all of them—that’s why I
urge to be careful with preprocessors (garbage in, garbage out), but
also wish the CSS working group to focus more on the side effects of
all the new features [1].

Now, there’s of course use for preprocessors. But there can’t be a
blanket yes or no: use of them depends on the project, the size and
skill of the team, the goals and ambitions, &c. Somebody just voting
yes (or no!) without considering these points doesn’t give sound
advice.

As for small projects, I recommend to use and—cherish them. Small
projects are great to build experience and to test theories. Try *not*
to use CMSes, libraries, preprocessors, and such in small projects.
The size—small :)—should permit that. There are many valuable things
to learn in small projects. One is how to avoid problems that are
annoying in a small project, but devastating in a big one. And another
is to employ techniques that improve code in a small project—and also
in a big one.

This all assumes people to be interested in tailored, optimized code.
I view this as the hallmark of a professional web developer, but I
understand that some of us are so used to being “pragmatic” that
anything that gets the job done faster wins. Alas, getting the job
done doesn’t mean getting the job done well. And I think that’s also
important to consider, at least be aware of, in this debate. Otherwise
preprocessors still mean but one thing: garbage in, garbage out.

I hope this helps.


[1] http://meiert.com/en/blog/20131205/spec-fragmentation/

-- 
Jens O. Meiert
http://meiert.com/en/
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to