WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#14303 closed defect (bug) (fixed)

Twenty Ten: minor image style edits

Reported by: 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 4 years ago.
14303-revised.diff (7.0 KB) - added by lancewillett 4 years ago.
Patch to improve image size handling
15501-image-styles.diff (6.9 KB) - added by iandstewart 4 years ago.
Patch to improve image size handling (sans width: auto)

Download all attachments as: .zip

Change History (22)

iandstewart4 years ago

comment:1 automattor4 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.

comment:2 nacin4 years ago

[15421] for 3.0.

comment:3 scribu4 years ago

  • Milestone changed from Awaiting Review to 3.1

comment:4 nacin4 years ago

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

lancewillett4 years ago

Patch to improve image size handling

comment:5 lancewillett4 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. :)

comment:6 ramoonus4 years ago

  • Cc ramoonus@… added

comment:7 iandstewart4 years ago

  • Cc ian@… added

comment:8 nacin4 years ago

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

iandstewart4 years ago

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

comment:9 iandstewart4 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.

comment:10 follow-up: Otto424 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.

comment:11 in reply to: ↑ 10 lancewillett4 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.

comment:12 wpweaver4 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.

comment:13 iandstewart4 years ago

@wpweaver The latest patch removes width:auto.

comment:14 nacin4 years ago

Marked #14775 as a duplicate.

comment:15 nacin4 years ago

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

comment:16 nacin4 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?

comment:17 hakre4 years ago

+1 for getting this fixed for trunk.

comment:18 nacin4 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.

comment:19 nacin3 years ago

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