Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

known-properties rule should tolerate star (IE6/7) & underscore (IE6) hacks #259

Closed
mahonnaise opened this issue Apr 25, 2012 · 3 comments
Closed
Milestone

Comments

@mahonnaise
Copy link
Contributor

.foo {
  margin-top: 10px;
  _margin-top: 15px;
}

Unknown property '_margin-top'.

.bar {
  *zoom: 1;
}

Unknown property '*zoom'.

While that's technically correct, it isn't very helpful. It makes this - otherwise very useful rule - too chatty.

Strictly speaking, it confuses one issue with another. Disallowing star/underscore hacks is a completely different thing. Filter hacks should be handled by dedicated rules. Therefore, the known-properties rule should silently pretend that the property name isn't prefixed with '*' or '_'.

@nzakas
Copy link
Contributor

nzakas commented Apr 25, 2012

Yup, you're right. That's a bug.

@sitedyno
Copy link

I really don't mind this but... isn't this really better? http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/

@nzakas
Copy link
Contributor

nzakas commented Apr 25, 2012

We're not debating the approach here. The CSS Lint parser does understand hacks, so it should give better messages. Perhaps we should add a rule to disallow star and underscore hacks, but that's not the job of this rule.

@nzakas nzakas closed this as completed in f2f3dc0 May 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants