Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

#4708 closed defect (bug) (fixed)

max-width: 100% on images breaks avatar cropping

Reported by: boonebgorges's profile boonebgorges Owned by: boonebgorges's profile boonebgorges
Milestone: 1.7 Priority: normal
Severity: normal Version: 1.6
Component: Core 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 11 years ago.

Download all attachments as: .zip

Change History (2)

@boonebgorges
11 years ago

#1 @johnjamesjacoby
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.