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

Error when using media query "orientation: landscape" #15

Open
sjscotti opened this issue Dec 29, 2020 · 0 comments
Open

Error when using media query "orientation: landscape" #15

sjscotti opened this issue Dec 29, 2020 · 0 comments

Comments

@sjscotti
Copy link

Hi!
I have started using your repository to switch between a desktop (orientation: landscape) and mobile (orientation: portrait) versions of a website. However, when using these orientation media queries, I was getting errors that I traced to the parsing of the media query in MQParser.prototype.parse in the file device.js. Apparently, using and as the criteria to split up the elements of a media query did not take into account that and is included in the word landscape. I developed a simple workaround to replace landscape with a dummy word, and I substituted landscape back again after the query was parsed. However, you may want to update the code to handle this situation in a more elegant manner. Thanks for developing this very useful capability!

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