Posted by dboulet on March 16, 2009 at 6:21pm
| Project: | External Links |
| Version: | 6.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
The icons that are shown in the descriptions on the External links settings page at admin/settings/extlink do not necessarily accurately reflect the actual icons that will be added to links, since these are themeable and may be overridden. We can show the actual icons by replacing the image with the following code:
<span class="ext"></span>| Attachment | Size |
|---|---|
| extlink_admin_description_icons.patch | 1.42 KB |
Comments
#1
Great suggestion. Is there any reason why we need the hard-coded "margin-right"? This will cause an unexpected margin on leading side (instead of after) for users of RTL languages like Hebrew or Arabic.
#2
Right, I hadn't thought of that. I had hard-coded the margin because without it there was no space at all between the icon and the text following it. Maybe it would be better to instead add an extra class to the span element? Maybe something like
<span class="ext inline"></span>, then control the spacing in the CSS file.#3
#4
Ok, this one has me a little stumped. Finding a way to insert the icons using span elements while keeping consistent surrounding spacing in RTL and LTR languages is proving to be difficult. Here are a few options that I've come up with (see attached screenshots to see what each looks like in FF3 on WinXP):
I've attached a patch for the last option, anyone else have any ideas?
#5
I think the last approach is probably the best, though it'd be better to include the
in the !icon replacement, rather than making translators have to deal with text that doesn't really need to be changed.#6
We could do that, but then there would be double spaces surrounding the icon.
#7
Perhaps putting the &nsbp; in the span would be sufficient then? That way browsers wouldn't compact the empty span tags as if there were three spaces in a row.
'#description' => t('Places an !icon icon next to mailto links.', array('!icon' => '<span class="mailto"> </span>')),#8
Good suggestion, but it still looks kinda weird--a double space is added before the icon. Here's a crazy idea, how about using a zero-width space
​instead?#9
Why is the span necessary?
the image can be placed directly into the anchor tag.
a .ext {
margin-right:12px; /*LTR*/
/* margin-left:12px; RTL*/
background: url(...) 100% 0 no-repeat; /*LTR*/
/*background: url(...) 0 0 no-repeat; RTL*/
}
#10
@offbeatpenguin, see http://drupal.org/node/132614#comment-873250.
#11
Given all the trouble of this issue, not to mention the fact that Drupal core now has standard admin-themes (like Seven) I think we'll just leave this one as-is. I think it's clear enough that an icon is going to be added if you check the box.
#12
Yeah, that's probably best—though this will still always bug me in D6. : )