css-mediaquery icon indicating copy to clipboard operation
css-mediaquery copied to clipboard

Add ignore list to match method

Open shamenchens opened this issue 10 years ago • 3 comments

shamenchens avatar Apr 17 '14 10:04 shamenchens

Can you please provide the rationale for this?

ericf avatar Apr 18 '14 20:04 ericf

It could be useful when you want some values to check against, and some of them you don't really care at all, and those values could put in the ignore list to prevent checking on them. For example, the min-width is the thing to be take care of but the orientation is not really important. We can specify the criteria on min-width and put orientation in the ignore list, so it can provide matches on min-width and regardless the orientation is landscape, portrait, or even not specified.

shamenchens avatar Apr 21 '14 11:04 shamenchens

I'm hesitant to add this because it doesn't match how a browser would try to match its current state against a CSS Media Query. I feel that adding another param for ignore list is not the way to go. I could possibly see using {orientation: 'any'} and supporting that, but this feels like a slippery slope.

What's an actual example of where this would be necessary? Because it seems like you could easily tweak your CSS to get the desired result.

Also is orientation the only Media Feature you use where you've run into this?

ericf avatar Apr 21 '14 15:04 ericf