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

Multiple viewports? #421

Open
Donderda opened this issue Aug 11, 2021 · 1 comment
Open

Multiple viewports? #421

Donderda opened this issue Aug 11, 2021 · 1 comment

Comments

@Donderda
Copy link

Sorry, not an issue but more like a question: Does minimalcss calculate the css for different viewports by default? Like for smartphones and desktops (and everything between it), or do I have to specify the viewport for each resolution and put together a css file for this?

@peterbe
Copy link
Owner

peterbe commented Aug 17, 2021

It, unfortunately, does not. It opens puppeteer with whatever it's current default viewport size is. But what you might want to do is to make sure it opens it twice! Once in a small viewport (e.g. mobile) and once in a large viewport (e.g. desktop) so that you get the union of the CSS necessary for both.
I wish there was a better mechanism to pass in options in minimalcss for how puppeteer should be opening the pages. A contribution would be most welcome.

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

2 participants