relative image size with "em" units

39 views
Skip to first unread message

Clemens Feige

unread,
Aug 8, 2019, 6:45:02 AM8/8/19
to trac-...@googlegroups.com
Hello

I would like to ask about setting the "right" size (height, width) of
images integrated in Wiki pages. How to specify the "right" size
considering a variable screen size and resolution?

In our environment we often insert pictures like flow diagrams,
screen-shots and others figures with much text. Of course our Trac users
use different screens, from small laptop screens up to ultra wide
screens, some have low resolution some have 4K resolution. Our users
also use different desktop and browser magnifications factors like 150%.

Of course we are aware that we can setup the height and width as
arguments to the Image-macro:

https://trac.edgewall.org/wiki/WikiMacros#Image-macro

The height and width can be absolute pixels or relative percentage:
[[Image(photo.jpg, width=200px)]]
[[Image(photo.jpg, width=50%)]]

But neither pixels nor percentage can accommodate for all screen sizes
and resolutions. Often pictures are too small or too big.

I am missing the ability to specify the picture size in "em" units. I
believe that a picture size relative to the font size would be an
improvement. I know that "em" is not supported by the HTML <img> tag, it
needs CSS. Trac could be improved and offer "em" units for images. What
do you think?

Are there other recommendations to improve picture
visibility/readability at variable screen size and resolution?

Thanks
Clemens


RjOllos

unread,
Aug 8, 2019, 3:13:43 PM8/8/19
to Trac Users
Adding recognition of em units to ImageMacro sounds good to me. That would be a good bitesized ticket for anyone looking to contribute to Trac.

- Ryan 

Clemens Feige

unread,
Aug 9, 2019, 6:33:54 AM8/9/19
to trac-...@googlegroups.com
Hello Ryan

I am glad that you support my idea about "em" units.

I searched, but could not find any existing ticket on that matter.
So I created this this new ticket #13191:

"relative image size with "em" units"
https://trac.edgewall.org/ticket/13191

Unfortunately I do not know Python and cannot contribute code.

Best regards
Clemens

Reply all
Reply to author
Forward
0 new messages