I have a bunch of card divs inside a flex container. When clicked the card should scale to be full screen (not fully fill the container, but really full screen, relative to the body/html).
If the devices width is smaller than its height the card should also rotate(90deg)
.
I tried this: http://codepen.io/anon/pen/ENyVzm
I think setting the width
and height
is not gonna work, since it will disrupt the flex layout.
I should instead scale the card to be fullscreen. Scale does not affect the flex layout as it only renders the visual representation and not the flow.
For that to work the card must be rendered (when in non-full screen mode) in the same aspect ratio as the device since we can only scale one factor and not scale width and height individually.
Are my thoughts correct or is there an easier way to accomplish that?