Skip to:
Content

BuddyPress.org

Opened 14 years ago

Closed 14 years ago

#4708 closed defect (bug) (fixed)

max-width: 100% on images breaks avatar cropping

Reported by: boonebgorges Owned by: boonebgorges
Priority: normal Milestone: 1.7
Component: Core Version: 1.6
Severity: normal Keywords: has-patch dev-feedback
Cc:

Description

I've come across a number of themes that are using the following CSS to help make images more responsive:

img { max-width: 100%; height: auto; }

Setting a max-width on all images has a tendency to break our implementation of jcrop, however, by throwing all images out of proportion, layering images in a weird way, and other such garbage.

I've attached a patch with my suggested fix, which works well on every theme I've tried it with, and seems to be specific enough not to cause any more problems. I'm posting here before committing, though, because I want someone more familiar with responsive techniques to have a look first. In particular, what will this do to the avatar cropper on small devices?

Attachments (1)

4708.patch (605 bytes ) - added by boonebgorges 14 years ago.

Download all attachments as: .zip

Change History (2)

@boonebgorges
14 years ago

#1 @johnjamesjacoby
14 years ago

  • Resolutionfixed
  • Status newclosed

(In [6620]) Force max-width: none; on more jcrop img elements. Props boonebgorges. Fixes #4708.

Note: See TracTickets for help on using tickets.