Feature #26552

Allow "max-height", "max-width", "min-height" and "min-width" CSS properties in Textile

Added by Michael Gerz 11 months ago. Updated 5 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Text formatting
Target version:4.0.0
Resolution:Fixed

Description

It is not possible to specify the max-width of an image.

The attached patch fixes it.

max-width-patch.diff Magnifier (567 Bytes) Michael Gerz, 2017-07-27 17:41

max-width-patch-v2.diff Magnifier - Support "max-height" property as well (718 Bytes) Go MAEDA, 2018-01-02 15:31

max-width-patch-v3.diff Magnifier - Support min-width/min-height/max-width/max-height property (712 Bytes) Go MAEDA, 2018-01-08 02:25

max-width-patch-v4.diff Magnifier - Added tests (1.45 KB) Go MAEDA, 2018-01-10 04:27

26552-test-height.diff Magnifier - additional tests (905 Bytes) Go MAEDA, 2018-01-11 14:19

Associated revisions

Revision 17173
Added by Go MAEDA 5 months ago

Allow "max-height", "max-width", "min-height" and "min-width" CSS properties in Textile (#26552).

Patch by Michael Gerz and Go MAEDA.

Revision 17175
Added by Go MAEDA 5 months ago

Add tests for "height" and "max-height" (#26552).

History

#1 Updated by Go MAEDA 11 months ago

  • Tracker changed from Defect to Feature
  • Subject changed from "max-width" is not a valid CSS style to Allow "max-width" in Textile formatting
  • Category set to Text formatting

#2 Updated by Michael Gerz 6 months ago

I suggest applying this patch (that's why I wrote it).

#3 Updated by Go MAEDA 6 months ago

Thank you for suggesting the improvement.

I almost agree with you, "max-width" property is beneficial. But I think "max-height" should be available as well. Probably users believe they can also use "max-height" if Redmine supports "max-width". I have slightly modified your patch to support "max-height".

#4 Updated by Go MAEDA 6 months ago

  • Target version set to 4.1.0

Setting target version to 4.1.0.

#5 Updated by Go MAEDA 6 months ago

  • File max-width-patch-v3.diffMagnifier added
  • Subject changed from Allow "max-width" in Textile formatting to Allow min-width/min-height/max-width/max-height property in Textile

Updated the patch to support min-width and min-height. Now the patch supports properties as follows:

  • min-width
  • min-height
  • max-width
  • max-height

#6 Updated by Go MAEDA 5 months ago

Added tests to the patch.

#7 Updated by Go MAEDA 5 months ago

  • Subject changed from Allow min-width/min-height/max-width/max-height property in Textile to Allow "max-height", "max-width", "min-height" and "min-width" CSS properties in Textile
  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version changed from 4.1.0 to 4.0.0
  • Resolution set to Fixed

Committed. Thank you for suggesting this improvement and sharing your patch.

#8 Updated by Marius BALTEANU 5 months ago

Go MAEDA wrote:

Added tests to the patch.

I would suggest to add the same two tests also for max-height and height.

#9 Updated by Mischa The Evil 5 months ago

  • Status changed from Closed to Reopened

Marius BALTEANU wrote:

Go MAEDA wrote:

Added tests to the patch.

I would suggest to add the same two tests also for max-height and height.

I agree.

#10 Updated by Go MAEDA 5 months ago

Marius and Mischa, thank you for pointing it out. Here is a patch to add tests for "height" and "max-height".

#11 Updated by Marius BALTEANU 5 months ago

Go MAEDA wrote:

Marius and Mischa, thank you for pointing it out. Here is a patch to add tests for "height" and "max-height".

Looks good to me.

#12 Updated by Go MAEDA 5 months ago

  • Status changed from Reopened to Closed

Committed tests for "height" and "max-height" in r17175.

Also available in: Atom PDF