Skip to:
Content

bbPress.org

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2553 closed defect (bug) (fixed)

Image proportions not kept in css

Reported by: robin-w's profile Robin W Owned by: netweb's profile netweb
Milestone: 2.6 Priority: normal
Severity: minor Version: 2.5.3
Component: General - UI/UX Keywords: commit
Cc:

Description

When posting an image to the forum the current bbpress.css makes the
image 100% width, so it does not break the forum layout.
Unfortunately this does not keep the image proportional so the height
stays the same.

current line 319-322 reads

#bbpress-forums div.bbp-topic-content img,
#bbpress-forums div.bbp-reply-content img {

max-width: 100%;

}

It is suggested that this is changed to

#bbpress-forums div.bbp-topic-content img,
#bbpress-forums div.bbp-reply-content img {

max-width: 100%;
height: auto;

}

Attachments (2)

2553.patch (370 bytes) - added by Robin W 11 years ago.
2553.2.patch (425 bytes) - added by Robin W 11 years ago.

Download all attachments as: .zip

Change History (12)

#1 @Robin W
11 years ago

  • Summary changed from Image proportion snot kept in css to Image proportions not kept in css

#2 @netweb
11 years ago

  • Component changed from Forums to UI
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 2.6

Do you want to create the patch for this?

#3 @Robin W
11 years ago

would love to if I knew how to do that - can you point me in the right direction on how I create it?

#4 @netweb
11 years ago

To get started and learn about how to create a patch that is in the format we use here (and the entire WordPress Trac ecosystem) here are a couple of docs to get you on your way:

http://make.wordpress.org/core/handbook/working-with-patches/
http://make.wordpress.org/core/handbook/working-with-patches/create-a-patch-using-tortoisesvn/
http://blog.ftwr.co.uk/archives/2005/11/03/windows-wordpress-toolbox/

bbPress' SVN repo URL is http://bbpress.svn.wordpress.org/trunk

@Robin W
11 years ago

#5 follow-up: @Robin W
11 years ago

Thanks, think I've done that right, let me know if not

#6 in reply to: ↑ 5 @netweb
11 years ago

Replying to Robin W:

Thanks, think I've done that right, let me know if not

Close, 99% of the way, per the coding standards there should not be a space before the ;

http://make.wordpress.org/core/handbook/coding-standards/css/

You should also create the patch from the 'root' directory of your repo.

When you create the patch from the 'root' directory then the path info is also added to the patch file, in this instance you should see this in the patch after you create it:

Index: src/templates/default/css/bbpress.css
===================================================================
--- src/templates/default/css/bbpress.css       (revision 5296)
+++ src/templates/default/css/bbpress.css       (working copy)
@@ -318,7 +318,8 @@

Rather than your current patch:

Index: bbpress.css
===================================================================
--- bbpress.css (revision 5296)
+++ bbpress.css (working copy)
@@ -318,7 +318,8 @@

This is so the patch can accurately tell exactly which file to patch in the repo.

Also to note since you created your patch @JJJ has added some changes to the repo so ensure you update your checked out repo before creating the new patch.

  • If your using SVN on the command line svn up
  • TortoiseSVN right click in the root of the repo and select SVN Update

@Robin W
11 years ago

#7 @Robin W
11 years ago

Thanks for the helpful info

Revised file uploaded

#8 @netweb
11 years ago

  • Keywords commit added; needs-testing needs-patch removed

Perfect :)

#9 @netweb
11 years ago

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

In 5306:

Use height: auto; alongside max-width: 100%; in bbpress.css to maintain image aspect ratio. Props robin-w. Fixes #2553

#10 @Robin W
11 years ago

great - thanks

Note: See TracTickets for help on using tickets.