Opened 13 years ago
Closed 8 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 )
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)
Change History (14)
by , 13 years ago
| Attachment: | JustBlack.png added | 
|---|
comment:1 by , 13 years ago
| Description: | modified (diff) | 
|---|---|
| Summary: | Add a margin around images → Add a margin around images included in wiki text using the Image macro | 
comment:2 by , 13 years ago
| Keywords: | image added | 
|---|
comment:3 by , 13 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 , 13 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.
follow-up: 6 comment:5 by , 12 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.
follow-up: 9 comment:6 by , 12 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 , 12 years ago
See also #11154 for a request to adjust the image macro width default value.
comment:8 by , 11 years ago
| Milestone: | → 1.0.3 | 
|---|---|
| Owner: | set to | 
| Status: | new → assigned | 
comment:9 by , 11 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 , 11 years ago
| Reporter: | changed from to | 
|---|
comment:11 by , 11 years ago
| Milestone: | 1.0.3 → next-stable-1.0.x | 
|---|---|
| Owner: | removed | 
| Status: | assigned → new | 
comment:12 by , 9 years ago
| Milestone: | next-stable-1.0.x → next-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 , 8 years ago
| Milestone: | next-stable-1.2.x | 
|---|---|
| Resolution: | → worksforme | 
| Status: | new → closed | 
This seems to be fixed on the trunk.



  
Looking more closely at WikiMacros#Image-macro, it does have a
marginoption. So I guess what I'd suggest here is just a better default. The patch in 3eb3b3a5 adds a0.5emmargin around the images contained in the#contentdiv(so this won't apply to, e.g. the header logo image). Themargincontinues to be overridden if the user specifiesmarginin the call to theImagemacro.