Edgewall Software

Ticket #3184 (closed task: fixed)

Opened 3 years ago

Last modified 2 years ago

Using CSS in Image Macro doc is broken

Reported by: anonymous Owned by: cboos
Priority: normal Milestone: 0.10
Component: wiki system Version: 0.9.5
Severity: trivial Keywords: ImageMacro CSS
Cc:

Description

I use CSS in the ImageMacro?, but since upgrading to 0.9.5 (on debian) I have noticed it is not working. To be specific, I use the following code [[Image(photo.png, float:right)]], which used to display the image on the right. I have seen the bug fix regarding image sizes and percentages, but that fix does not resolve this problem.

Attachments

trac_banner.png (2.1 KB) - added by cboos 3 years ago.
test image

Change History

Changed 3 years ago by cboos

test image

Changed 3 years ago by cboos

  • owner changed from jonas to cboos
  • summary changed from Using CSS in Image Macro is broken to Using CSS in Image Macro doc is broken
  • type changed from defect to task
  • milestone changed from 0.9.6 to 0.10

The syntax has changed slightly. It should be:

[[Image(photo.png, align=right)]] test image

to get a "float: right" image.

I thought that I fixed the doc... Ok, only in 0.9-stable (if you're using 0.9.5, check again your [[MacroList(Image)]] doc).

I'll port that to trunk.

Changed 3 years ago by simon-code@…

I have a similar issue where I have been using padding-left:10px or similar variations of padding: for a number of my images. It has been very useful in getting the right amount of space between image and text when the text flows around it.

This no longer works with version 0.9.5 due to the security tightening of the macro. Could you please add support for padding?

Changed 2 years ago by cmlenz

As we don't want to have to sanitize user-supplied CSS properties in the [[Image]] macro, we have restricted the supported options down to a minimum. If you want extra styling, I would recommend using a class and then define the corresponding style rules in your custom CSS style sheet. The other option is using an #!html block…

While adding back support for specific style properties such as padding is not completely out of the question, I view that as a slippery slope: next we'll need padding on other side, borders on either side, margins when aligned, etc. Where would we stop?

Changed 2 years ago by cboos

  • status changed from new to closed
  • resolution set to fixed
  • severity changed from major to trivial

Ported documentation update from 0.9-stable in r3353.

Add/Change #3184 (Using CSS in Image Macro doc is broken)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cboos. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.