rsantamaria/papercrop

Crop preview vs. Zurb Foundation

Closed this issue · 1 comments

Just a quick note to document an issue I was having—nothing to do with the gem itself, but how it worked inside of a project using Zurb Foundation.

The crop preview was always stuck at 100% width which made it look like it was broken. The image would crop correctly though, so I narrowed down the issue to the CSS attributes being set by the papercrop.js file. I saw that those were being set correctly as well, which led me to look for a style that was overriding what was being set, which led me to Foundation.

In Foundation, all images are set to: min-width: 100%, so to fix this, I had to override the crop_preview image with:

max-width: none !important;

Note: for my application, the image had an id of #image_crop_preview, but that will differ based on what you've called your attachment.