CSSLint / csslint

Automated linting of Cascading Stylesheets
http://csslint.net
Other
4.77k stars 483 forks source link

Warning for 'heading already defined' when using @media queries #15

Closed necolas closed 13 years ago

necolas commented 13 years ago

If you are overriding styles for headings in media queries (e.g. for smaller screens or for print) you still get a warning.

nzakas commented 13 years ago

Nicole, what do you think here?

stubbornella commented 13 years ago

I'm not convinced media queries are the right answer to small screens for commercial websites.

Print is very specific with it's own set of bugs (like FF cropping anything with a formatting context at the page level), the linter probably won't look for the same bugs in print stylesheets.

mahonnaise commented 13 years ago

My suggestion from issue 80 ("location dependent H" instead of "duplicate H") happens to solve this issue, too.

nzakas commented 13 years ago

So what is the suggested rule change here?

necolas commented 13 years ago

I don't think the "heading already defined" warning should appear at all if the additional heading selector is in a different media query.

stubbornella commented 13 years ago

I like your suggestion @mahonnaise but I do worry that "location dependent" is an OOCSS term with which everyone else may not be familiar.

I'm not sure what to do with this bug, but I'd like to start more discussion around it. @necolas - would you be willing to start that discussion on the CSS Lint google group? http://groups.google.com/group/css-lint

necolas commented 13 years ago

Shouldn't this be left open until it is resolved?

nzakas commented 13 years ago

There isn't enough information to proceed and also not a clear path forward. We don't believe in leaving bugs open forever just in case. Please start a discussion on the mailing list and see if you can get quorum on what you think should be done, then a new issue with more specifics can be opened.