3 ms·
Important to know, I suppose... But if you are building a quick app or prototype, I've found frameworks like blueprint (http://www.blueprintcss.org/ http://www
by unignorant 17y ago
Important to know, I suppose...
But if you are building a quick app or prototype, I've found frameworks like blueprint (http://www.blueprintcss.org/ http://www.blueprintcss.org/) to be quite helpful.
- CoryMathews 17y agoPersonally I cannot stand frameworks for css. They completely screw up the default styles, and make it much harder for other developers to quickly make css changes to a site. CSS frameworks are different from other programming frameworks because it overwrites defaults. It is equivalent to something like overriding printf in c to do add an extra character at the beginning. Its just ridiculous.
- ludwig 17y agoYou know that's on purpose, right? Different browsers have different defaults. Therefore, the easiest way to ensure consistency is to start from a clean slate and be explicit.
- CoryMathews 17y agoYes, thats the problem. When I add an h1 tag, I expect some defaults such as display:block, margins and padding. When I add a p tag it should NOT work the same as just adding br tags. I should see the default spacing between paragraphs.
- RyanMcGreal 17y agoI'm sold on CSS resets. When I add an h1 tag, I expect it to be styled exactly the way my CSS styles it, and nothing else (e.g. a default 1em bottom margin in some browsers but not others).
- eam 17y agoI never use frameworks. I just use Meyers reset and take it from there.
- nbrochu 17y agoExactly! It's not like it is really that complicated to make it work from there... If you think it is, learn CSS properly (i.e. stop cutting corners!).
- rimantas 17y agoNo, the easiest way is just to be explicit. On the other hand, trying to chase pixel perfect look in different web browsers is just a waste of time these days, so having slight differences in whitespace is OK, imho. http://dowebsitesneedtolookexactlythesameineverybrowser.com/ http://dowebsitesneedtolookexactlythesameineverybrowser.com/
- antidaily 17y agoI can't stand trying to figure out a 4 column layout that works in most browsers. Also, there are really lightweight frameworks that don't touch default text and form styling.
- CoryMathews 17y agoThese frameworks are fine but they are few and far between.
- antidaily 17y agoThis one is 1kb http://www.usabilitypost.com/2009/05/29/the-1kb-css-grid-part-1/ http://www.usabilitypost.com/2009/05/29/the-1kb-css-grid-par...
- nbrochu 17y agoI fail to see the use of CSS frameworks (and yes, I have tried most of them). Honestly, in my experience: - The time you invest in learning the ropes of that framework would be better invested in properly learning CSS. I wouldn't say this of any framework in any language, but CSS is easy and, contrarily to what I constantly hear, it isn't that hard to master. - Once you know CSS well, it's much faster to convert a PSD by hand than trying to make it work with your framework. The more detailed the actual design, the more this applies. - The only pseudo-framework that actually boosts styling speed is leveraging a well-maintained css reset stylesheet. Keep in mind that this is coming from somebody that knows CSS well... I understand why a framework sounds appealing, especially since we have a lot of them on the development side, but in the case of CSS, it is total overkill.
- gnaritas 17y agoFrameworks are just reusable classes, this is most valuable when they're your own reusable classes. Coupled with something like less or sass to extend CSS to allow mixins, having parameterized reusable classes is awesome. The problem with other peoples frameworks is, well... they're other peoples frameworks. Develop your own and you'll love it. Such frameworks allow you to factor your CSS and eliminate repetition and patterns you use often.
- pmjordan 17y agoI've been using CSS off-and-on pretty much since the first browsers started supporting it; I too struggle to see the point of the frameworks I've tried. There's only one thing I have trouble with: maintaining clean & tidy CSS once a site grows beyond a certain point. Details get changed, which causes classes, etc. to be forked, rules don't get deleted because it's not clear if they're really unused, etc. Do you have any advice for dealing with this? I feel there ought to be some way of semi-automatically "refactoring" style sheets, or keeping them compact and neat to begin with, but I haven't yet found it.