Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#14303 closed defect (bug) (fixed)

Twenty Ten: minor image style edits

Reported by: iandstewart's profile iandstewart Owned by:
Milestone: WordPress.org Priority: normal
Severity: major Version: 3.0
Component: Themes Keywords: needs-testing, has-patch
Focuses: Cc:

Description

The attached patch adds width:auto to content images to prevent "stretching" in IE8 and a "single-attachment" class to the container on attachment templates to keep everything (navigation, titles, etc.) full-width like the centered image attachments.

Attachments (3)

image-edits.diff (656 bytes) - added by iandstewart 14 years ago.
14303-revised.diff (7.0 KB) - added by lancewillett 14 years ago.
Patch to improve image size handling
15501-image-styles.diff (6.9 KB) - added by iandstewart 14 years ago.
Patch to improve image size handling (sans width: auto)

Download all attachments as: .zip

Change History (22)

#1 @automattor
14 years ago

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

(In [15421]) Twenty Ten minor image style edits. props iandstewart, fixes #14303 for trunk.

#2 @nacin
14 years ago

[15421] for 3.0.

#3 @scribu
14 years ago

  • Milestone changed from Awaiting Review to 3.1

#4 @nacin
14 years ago

  • Milestone changed from 3.1 to 3.0.1
  • Resolution fixed deleted
  • Status changed from closed to reopened

@lancewillett
14 years ago

Patch to improve image size handling

#5 @lancewillett
14 years ago

  • Cc lance@… added
  • Keywords needs-testing has-patch added

iandstewart and I worked together today on improving image dimensions when the image is larger than the main column width, including making sure things work better in IE8.

Patch details (14303-revised.diff):

  • Only apply max-width to images that are uploaded to the media gallery
  • Revert r14272 (specificity isn't needed)
  • Apply max-width to wp-caption to avoid breakage with over-wide images
  • Add custom-menu tag
  • Cleanup and formatting fixes for editor-style stylesheet

These fixes need further testing, especially in IE7 and IE8 -- any help would be appreciated. :)

#6 @ramoonus
14 years ago

  • Cc ramoonus@… added

#7 @iandstewart
14 years ago

  • Cc ian@… added

#8 @nacin
14 years ago

  • Component changed from General to Themes
  • Milestone changed from 3.0.1 to 3.0.2

@iandstewart
14 years ago

Patch to improve image size handling (sans width: auto)

#9 @iandstewart
14 years ago

I've attached a revised version of lancewillet's patch that removes width: auto. The auto width that corrects image stretching causes image-edits made in the Visual Editor to be ignored.

#10 follow-up: @Otto42
14 years ago

This doesn't fix the underlying issue, I think, which is that the TinyMCE image editor plugin only sets width and height attributes the image tag. That's not enough to accomplish a resize in all themes, nor should it be. I think the editimage.js file needs to be modified to make it insert an inline style with the width and height parameters as well.

#11 in reply to: ↑ 10 @lancewillett
14 years ago

Replying to Otto42:

This doesn't fix the underlying issue, I think, which is that the TinyMCE image editor plugin only sets width and height attributes the image tag.

These CSS rules apply to any image uploaded and inserted via Media tools, as is not limited to images edited with TinyMCE—that should probably be a different ticket.

#12 @wpweaver
14 years ago

The width: auto breaks any image that a user enters the img tag + width by hand in all current browsers. Don't know about relationship to TinyMCE, or if @iandstweart's post means the width: auto got put back in, but it really is causing lots of problems for lots of people. Just wanted you all to be aware of how serious this issue is to people with images in their Twenty Ten (or child theme) sites. Many have had to take all their images, resize them in a photo editor, then re-upload them. For whatever reason, the width:auto makes all the browsers simply ignore the width specification in an img tag. Sorry if this post is out of place. but I've been getting a very large number if people with this issue using my Twenty Ten child theme.

#13 @iandstewart
14 years ago

@wpweaver The latest patch removes width:auto.

#14 @nacin
14 years ago

Marked #14775 as a duplicate.

#15 @nacin
14 years ago

(In [15609]) Fix image size handling in Twenty Ten. props lancewillett, iandstewart, see #14303 for trunk.

#16 @nacin
14 years ago

  • Severity changed from normal to major

Suggesting we commit to the 3.0 branch, fix on wpcom if we haven't already, and release Twenty Ten 1.4. Is this ready for that visibility/exposure?

#17 @hakre
14 years ago

+1 for getting this fixed for trunk.

#18 @nacin
14 years ago

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

(In [15786]) Fix image size handling in Twenty Ten. props lancewillett, iandstewart, fixes #14303 for 3.0.

#19 @nacin
13 years ago

  • Milestone changed from 3.0.2 to WordPress.org
Note: See TracTickets for help on using tickets.