Do you use CSS preprocessors? HTML/CSS frameworks?
Page 1 of 1

3rd party code, or do it yourself?
Meinself
80%
 80%  [ 4 ]
3rd party
20%
 20%  [ 1 ]
Total Votes : 5

Interinactive
VIP Member



Posts: 29151

PostPosted: Fri, 7th Dec 2012 06:55    Post subject: Do you use CSS preprocessors? HTML/CSS frameworks?
Obviously these are becoming more and more popular (SASS, LESS, Compass, Bootstrap etc), I'm just wondering how many people bother

I have a few issues with these but none are related to using them... Since I have a bit of programming knowledge, I can adapt to the preprocessors pretty easily, but I've never come across any situation where these would actually be needed.

In the case of CSS preprocessors , what happens when someone gets your CSS months later and they don't know how to read or output it? Are mixins/variables really that much of a time saver? I find it pretty unreadable and to me I look at it as a programmers way of using CSS, rather than that of a front end developer. Last month I also had one issue where I had to edit old code that had deprecated bits and pieces in it (Compass specific), so Compass wasn't able to output it without first fixing/deleting the old stuff.

The time it takes to process the CSS also bothers me... I'm a very quick worker and I like to preview changes instantly, some of them take forever to compile, by the end of the day it all adds up

As for Bootstrap and other frame works... I recently made a responsive site. My CSS came in at 23kb, that included everything... the minified bootstrap CSS file alone is 98KB, with the responsive one coming in at 16KB. This is before I've even applied my own styling or CSS, plus I'd be left with a HEAP of grids and other bits of code I wouldn't use anyway. I find it quite easy to apply my own grids.

I find keeping it simple, clean, and easy to read so that anyone can understand it is best. I hate clutter, and I hate having more code than what is needed. To me, it works much better than putting a heap of CSS/JS libraries/Structural HTML in from various 3rd parties.

If you use anything like these, how come? Is it because you have to or you actually prefer it?
Back to top
Werelds
Special Little Man



Posts: 15098
Location: 0100111001001100
PostPosted: Fri, 7th Dec 2012 09:44    Post subject:
We use LESS and a boilerplate HTML template that has all the necessary stuff ready to be filled in (the 9123847 meta tags, viewport setting, favicons). Our LESS is our own though, no Bootstrap. We've got a couple of layout structures (fixed grids, fluid grids and so on) in separate files to swap in.

Interinactive wrote:
I have a few issues with these but none are related to using them... Since I have a bit of programming knowledge, I can adapt to the preprocessors pretty easily, but I've never come across any situation where these would actually be needed.

In the case of CSS preprocessors , what happens when someone gets your CSS months later and they don't know how to read or output it? Are mixins/variables really that much of a time saver? I find it pretty unreadable and to me I look at it as a programmers way of using CSS, rather than that of a front end developer.

When you're churning out several designs a month, having a good base in LESS with some variables will save you lots of time. For example, if you usually use a fixed grid but not always the same size site or you do a responsive one, you can use variables to determine the width of columns rather than having to go through your CSS file and manually fix specific numbers that you'll have to calculate manually.

Same goes for a lot of mixins; Bootstrap/Compass went overboard, but using mixins to skip all the vendor-specific shit is a huge timesaver. Our LESS "framework" is much smaller, about 4800 bytes when compiled; still has a bunch of vendor mixins that are used in almost every site now (border-radius, transition, box-shadow) and will allow us the change all the fonts and colours within a few seconds to already get the basic styling going.

That's aside from the fact that on a big site you can easily get a few thousand lines of CSS going even though most of that is standard reset and styling stuff. With one of these preprocessors you're working in a much smaller file with less than 1000 lines, while all the tedious shit is kept away.

Only of our frontend people (we got 6 right now) know the first thing about programming; every time I get to work on implementing the designs their JS makes me cringe (as in, I can reduce their shit down to 20% of their code). But LESS they all picked up very quickly. Still can't do JS for shit beyond downloading a plugin and following the examples, but LESS is not a problem for them :/

Interinactive wrote:
The time it takes to process the CSS also bothers me... I'm a very quick worker and I like to preview changes instantly, some of them take forever to compile, by the end of the day it all adds up

Not sure what to say here, I can make a change in one of the LESS files and SimpLESS will have compiled it before I've even alt-tabbed back to the browser. We pre-compile though, we don't use less.js or something to dynamically compile it on request.



I think you just need to create your own LESS framework to see how much time it saves you.
Back to top
[mrt]
[Admin] Code Monkey



Posts: 1338

PostPosted: Sun, 9th Dec 2012 16:34    Post subject:
Cool guys. Wanted to say thanks for the heads up.

Awesome thing. I always nagged at the repetitiveness of CSS. The Mixin's and global variables look like a life-saver. Also rules emmited as funtions, give them beer!

I'm sure to try it out.


teey
Back to top
Page 1 of 1 All times are GMT + 1 Hour
NFOHump.com Forum Index - Programmers Corner
Signature/Avatar nuking: none (can be changed in your profile)  


Display posts from previous:   

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.8 © 2001, 2002 phpBB Group