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

Wrong feature detection for grid, color, color-index and monochrome #10

Open
maltewassermann opened this issue Jun 19, 2014 · 0 comments

Comments

@maltewassermann
Copy link

The features at https://github.com/ericf/css-mediaquery/blob/master/index.js#L67-74
does not handle the following case (one or both expressions without an value) on the correct way:

mediaQuery.match('screen and (color)', {
  type : 'screen',
  color: 8
});

See http://www.w3.org/TR/css3-mediaqueries/#color

One possible approach might be this (@ericf, -1 and -1 returns true – but a specified cannot be negative, in general!?):

expValue = !isNaN(expValue) ? parseInt(expValue, 10) : value > 0 ? value : 1;
value = !isNaN(value) ? parseInt(value, 10) : expValue > 0 ? expValue : 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant