dkniffin / active_material

ActiveAdmin skin based on Google's Material Design
MIT License
177 stars 69 forks source link

[#56] Fix responsiveness for images inside a table #57

Closed irmela closed 4 years ago

irmela commented 5 years ago

Fixes #56

nhunzaker commented 5 years ago

I wonder why max-width would be the culprit. I think we have this for very large images.

irmela commented 5 years ago

You're right. Thanks for noticing. I changed it to:

img {
  display: block;
  max-width: 320px;
  width: 100%;
}
irmela commented 5 years ago

@nhunzaker anything else that needs to be done here?

nhunzaker commented 4 years ago

Sorry to get back to this so late...

Adding width: 100% causes images on index page tables to be shrunk:

image

One solution could be to add height: auto, however that can result in very small images:

image

Still, it otherwise pushes the table over into overflow, which is not great.

I'll merge this and add height: auto. Thanks!