question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lower minimum viewport dimension bound

See original GitHub issue
  • Operating System: macOS High Sierra (10.13.3)
  • Cypress Version: 2.1.0
  • Browser Version: Chrome 64.0.3282.186

Current behavior:

Setting the viewport height or width bellow 200 pixels is currently not allowed. In the docs, it is stated that the height and width values must lie within the bounds of 200 to 3000 pixels.

Desired behavior:

To me, the desired behavior would be to allow setting values bellow 200 with my situation being that our web app is meant to be embedded within an iframe on other sites where it’s layout relies on the viewport size, which height can be as small as 80 pixels. This makes us want to test down to this viewport size.

It would be very interesting to hear why this lower dimension bound exists and why it is currently 200 pixels. Any insight into this would be much appreciated. Could it be lowered or removed? I really like Cypress so far and hope to be able to use it.

How to reproduce:

Call cy.viewport(199, 199) and you’ll get the warning I’m talking about.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
brian-manncommented, May 30, 2018

Released in 3.0.0.

0reactions
karansapoliacommented, Mar 12, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

Viewport Sized Typography | CSS-Tricks
It's not common to change the viewport size on mobile devices, ... This idea of binding the overall width of a header with...
Read more >
Understanding Success Criterion 1.4.10: Reflow | WAI - W3C
The value of 320 CSS pixels was chosen as a reasonable minimum size that ... within the bounds of viewport at zoom levels...
Read more >
How to set max viewport in Puppeteer? - Stack Overflow
When you set the viewport with width and height as "0", the page viewport size becomes equal to size of the browser. Share....
Read more >
Viewport concepts - CSS: Cascading Style Sheets | MDN
What is a viewport? · On larger monitors where applications aren't necessarily full screen, the viewport is the size of the browser window....
Read more >
CSS Clamp(): The Responsive Combination We've All Been ...
With CSS max() in effect, the <div> will end up being at least 700px wide, or 50vw — whichever is greater. For example,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found