css-mediaquery
css-mediaquery copied to clipboard
Add ignore list to match method
Can you please provide the rationale for this?
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.
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?