Edgewall Software
Modify

Opened 11 years ago

Closed 7 years ago

#11116 closed enhancement (worksforme)

Add a margin around images included in wiki text using the Image macro

Reported by: Ryan J Ollos Owned by:
Priority: low Milestone:
Component: wiki system Version:
Severity: minor Keywords: css image
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos <ryan.j.ollos@…>)

I noticed while looking at description:ticket:11112 that there is no margin around the images. Here is another example:

It's not so noticeable for regular text, but inline code blocks bump up against the image.

Attachments (1)

JustBlack.png (1.3 KB ) - added by Ryan J Ollos <ryan.j.ollos@…> 11 years ago.

Download all attachments as: .zip

Change History (14)

by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

Attachment: JustBlack.png added

comment:1 by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

Description: modified (diff)
Summary: Add a margin around imagesAdd a margin around images included in wiki text using the Image macro

comment:2 by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

Keywords: image added

Looking more closely at WikiMacros#Image-macro, it does have a margin option. So I guess what I'd suggest here is just a better default. The patch in 3eb3b3a5 adds a 0.5em margin around the images contained in the #content div (so this won't apply to, e.g. the header logo image). The margin continues to be overridden if the user specifies margin in the call to the Image macro.

comment:3 by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

Now that I look more closely, certain letters in normal text also bump against the inline code blocks.

For example:
ggggg yyyyy pppp jjj qqqqq
Some inline code block

I still like the idea of a small margin around the images, but perhaps the styling of the inline code blocks needs to be adjusted.

comment:4 by Christian Boos, 11 years ago

We could use box-shadow: 0 0 0 1px #edc inset instead of border: 1px solid #edc, that would buy us a pixel and avoid the character descender to touch that visible border. But not all browsers would support that.

comment:5 by Ryan J Ollos, 10 years ago

Another thing I just noticed about inline code blocks is that underscores can be hidden.

trac.utils.__init__ is fine, but
when we have two consecutives lines
trac.utils.__init__
trac.utils.__init__
the underscores of the first line are hidden.

in reply to:  5 ; comment:6 by Ryan J Ollos, 10 years ago

Replying to rjollos:

Another thing I just noticed about inline code blocks is that underscores can be hidden.

This seems to be browser/platform dependent. In Chrome 30 on Win7 I can see the underscores. When I switch over to Chromium 28 on Ubuntu 13.04 in my VM (which is where I added comment:5 from yesterday), the underscores are hidden.

comment:7 by Peter Suter, 10 years ago

See also #11154 for a request to adjust the image macro width default value.

comment:8 by Ryan J Ollos, 10 years ago

Milestone: 1.0.3
Owner: set to Ryan J Ollos
Status: newassigned

in reply to:  6 comment:9 by Jun Omae, 10 years ago

Replying to rjollos:

Replying to rjollos:

Another thing I just noticed about inline code blocks is that underscores can be hidden.

This seems to be browser/platform dependent. In Chrome 30 on Win7 I can see the underscores. When I switch over to Chromium 28 on Ubuntu 13.04 in my VM (which is where I added comment:5 from yesterday), the underscores are hidden.

Are you using "Courier New" font? See https://code.google.com/p/chromium/issues/detail?id=41457.

IMO, I don't recommend using that font since the underscore character is below its descent line, google:"underscore courier new".

comment:10 by Ryan J Ollos, 10 years ago

Reporter: changed from Ryan J Ollos <ryan.j.ollos@…> to Ryan J Ollos

comment:11 by Ryan J Ollos, 9 years ago

Milestone: 1.0.3next-stable-1.0.x
Owner: Ryan J Ollos removed
Status: assignednew

comment:12 by Ryan J Ollos, 7 years ago

Milestone: next-stable-1.0.xnext-stable-1.2.x

Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.

comment:13 by Ryan J Ollos, 7 years ago

Milestone: next-stable-1.2.x
Resolution: worksforme
Status: newclosed

This seems to be fixed on the trunk.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.