News for hackers. Stuff that matters.
Re:CSS Lint by rimantas on Wednesday June 15, 2011 @05:38PM (#2659133)
Don't pay attention to that tool. Nicole has her own and peculiar view on CSS and many rules in CSS Lint make very little sense.

There is nothing wrong with .foo.bar. There are problems with outdated versions of IE, should that stop you?

There is nothing wrong with ID selectors.

There is nothing wrong with having display:inline on the floated element. No harm done, fixes double margin bug in IE6 if you need that.

It is ok to have many rules for heading no matter that CSS Lint says.

It is ok to have width, padding and borders defined. I do that all the time and surprise surprise, result is just as I intended. I am not sure if CSS Lint knows anything about box-sizing rule.

Etc., etc.

Unit-less zeroes, no empty rules do make sense, but I guess decent CSS compressor would take care of those.

Re:CSS Lint by ryan-allen on Wednesday June 15, 2011 @11:39PM (#2660033)
The purpose of these lint tools is to attempt to standardise your opinions as the correct way of doing things. Without a tool that 'checks for correctness' (against someone's opinions), they're perceived as just that: opinions.

It's a very clever way to convince others of your ideas. The same thing has happened with JS Lint. Suddenly many people agree 'this is the correct way to write javascript', you ask them why and they point at the tool as if the correctness is self evident.

Re:CSS Lint by podperson on Wednesday June 15, 2011 @07:01PM (#2659415)
Agreed -- almost all its complaints about the first css file I passed it were "don't use id selectors".

I suspect some of the complaints are valid, but simply saying "broken box model" doesn't explain why.

Re:CSS Lint by pbhjpbhj on Thursday June 16, 2011 @11:01AM (#2661529)
Ditto. Funnily enough you also get some rules that tell you to use id selectors:

    Overqualified Elements	Element (a#galleryLink) is overqualified, just use #galleryLink without element name.
    a#galleryLink {
This was given as a warning, but it's spot on too - https://developer.mozilla.org/en/Writing_Efficient_CSS for example.
Re:CSS Lint by podperson on Thursday June 16, 2011 @01:07PM (#2662161)
I think it's actually saying a#foo is worse than #foo (assuming you're not reusing #foo in which case, conceptually, shouldn't it be a.foo?).

Indeed, I'd argue it ought to say that you EITHER ought to use a.foo or #foo depending on what you're doing in the page.

I'm not an efficiency nut, but it's quite possible #foo runs faster than .foo and this might be important to you, even if giving multiple things the same ID makes you feel dirty.

Re:CSS Lint by redemade on Wednesday June 15, 2011 @06:39PM (#2659352)
I agree. most of these "rules" are frivolous. simply removing the 3 @import lines in the example file would be a much bigger win than worrying about ids and "overqualified elements"
Re:CSS Lint by gigamonkey on Wednesday June 15, 2011 @06:09PM (#2659247)
I'm curious what folks do who follow the no-qualified-headers rule. When they have things that act like headers but which need to be styled differently than the single header style used on the site, do they just use classed P's or DIV's? Confused.
Re:CSS Lint by mindhunter on Wednesday June 15, 2011 @07:53PM (#2659575)
Objection!