Project

General

Profile

Actions

Feature #26552

closed

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

Added by Michael Gerz over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Text formatting
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

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

The attached patch fixes it.


Files

max-width-patch.diff (567 Bytes) max-width-patch.diff Michael Gerz, 2017-07-27 17:41
max-width-patch-v2.diff (718 Bytes) max-width-patch-v2.diff Support "max-height" property as well Go MAEDA, 2018-01-02 15:31
max-width-patch-v3.diff (712 Bytes) max-width-patch-v3.diff Support min-width/min-height/max-width/max-height property Go MAEDA, 2018-01-08 02:25
max-width-patch-v4.diff (1.45 KB) max-width-patch-v4.diff Added tests Go MAEDA, 2018-01-10 04:27
26552-test-height.diff (905 Bytes) 26552-test-height.diff additional tests Go MAEDA, 2018-01-11 14:19

Related issues

Related to Redmine - Defect #38073: CommonMark Markdown formatter does not support min-width, max-width, min-height, and max-height CSS propertiesClosedGo MAEDA

Actions
Actions #1

Updated by Go MAEDA over 6 years 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
Actions #2

Updated by Michael Gerz over 6 years ago

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

Actions #3

Updated by Go MAEDA over 6 years 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".

Actions #4

Updated by Go MAEDA over 6 years ago

  • Target version set to 4.1.0

Setting target version to 4.1.0.

Actions #5

Updated by Go MAEDA over 6 years ago

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
Actions #6

Updated by Go MAEDA over 6 years ago

Added tests to the patch.

Actions #7

Updated by Go MAEDA over 6 years 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.

Actions #8

Updated by Marius BĂLTEANU over 6 years ago

Go MAEDA wrote:

Added tests to the patch.

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

Actions #9

Updated by Mischa The Evil over 6 years 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.

Actions #10

Updated by Go MAEDA over 6 years ago

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

Actions #11

Updated by Marius BĂLTEANU over 6 years 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.

Actions #12

Updated by Go MAEDA over 6 years ago

  • Status changed from Reopened to Closed

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

Actions #13

Updated by Go MAEDA over 1 year ago

  • Related to Defect #38073: CommonMark Markdown formatter does not support min-width, max-width, min-height, and max-height CSS properties added
Actions

Also available in: Atom PDF