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
how to set options to get mobile CSS only? #453
Comments
If you want to generate separate CSS files for desktop and mobile without using media queries, you can use different tools or methodologies. Here are a few approaches:
These approaches allow you to serve different CSS files based on specific conditions without relying on media queries in the CSS itself. Keep in mind that user agent detection has its limitations and may not always accurately reflect the user's device characteristics. |
Hi, team,
I am trying to use UnCSS to generate mobile version CSS for a page. How could I achieve this?
I tried setting the userAgent to "mobile" or "Android" or "iPhone" or other strings from mobile devices, also tried setting with the "media" options with value such as "(max-width: 767px)" etc, but the results I got are always the same as the desktop version CSS.
Could you please give some hints or directions on how to achieve this?
Thanks,
Abe
The text was updated successfully, but these errors were encountered: