-
Notifications
You must be signed in to change notification settings - Fork 612
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
Responsive devices ? #21
Comments
I was able to center the phone horizontally & vertically by adding this code to my CSS file |
The real issue is the device metrics, not positioning.
to be used in media queries ! |
It would be ideal if the entire device and everything in it was able to scale linearly according to vh or %. Also, it's worth nothing that zoom is not supported in firefox at all. This would be a great thing to do if someone wanted to contribute to the project. Non responsive devices is a dealbreaker for me, can't use this library. |
To achieve this you can use the css selector transform with scale property and media queries. DEMO |
Hi everyone, brand new to Github (and relatively new to coding in general) - just want to let you know that I found a bit of a workaround for this (totally unsure of browser compatibility etc!):
Hopefully that proves useful for someone! (I only used the iphone 8 code so unsure if it works with all devices but I don't see why not?) |
This is literally great idea, you won this issue Evan! Using scale or zoom isn't really a solution as it mixes DOM measurements that are hard to handle. |
You're right @adriandmitroca , @evansanto totally nailed it, it should work with all the devices. Here's a demo. |
@evansanto very nice indeed! |
Give https://github.com/osrec/ResponsiveDevices.css a try for totally responsive devices - they're not as detailed as the very realistic ones on here, but might be useful to someone :) |
As per marvelapp#21 * Replace "px" with "em" * Set a font-size of "1px" for devices
As per marvelapp#21 * Replace "px" with "em" * Set a font-size of "1px" for devices
@evansanto be careful with this on chrome, you can run into issues with Chrome's minimum font size making the device huge |
I wrote a different approach to this issue. My version modifies the scss directly, which you can then use to create the phones in any size you want. If you want to change between multiple sizes, use @media queries and load multiple files. |
Nice endeavour @philipkiely, it looks like you nailed it. |
Use 100px as the container element font size and divide all em units by 100. cc marvelapp#21
Use 100px as the container element font size and divide all em units by 100. cc marvelapp#21
Word of caution regarding
source: https://developer.mozilla.org/en-US/docs/Web/CSS/zoom |
Is here any way to make devices responsive ? Something like images with css : width:100%; height:auto; ?
The text was updated successfully, but these errors were encountered: