- Fileリンクにあるファイルアイコンとファイルリンクのずれがあります

- 具体的に要素を調べてみたら、Iconの上位にあるMargine(0px, 0px, 1em)設定に影響されています。

- 上位のCSS Stype設定を修正するとほかの表示タイプ(画像)に影響するので、アイコンのCSS StyleでMarginをオーバーライトすることになりました
- sites/all/modules/media/media.moduleに以下のコードを追加しました
/**
* Implement hook_theme_registry_alter()
*/
function media_theme_registry_alter(&$theme_registry) {
if (!empty($theme_registry['file_icon']['function'])) {
$theme_registry['file_icon']['function'] = 'media_file_icon';
}
}
/**
* override theme_file_icon method.
*/
function media_file_icon($variables) {
$file = $variables['file'];
$icon_directory = $variables['icon_directory'];
$mime = check_plain($file->filemime);
$icon_url = file_icon_url($file, $icon_directory);
return '<img style="margin:0px;" class="file-icon" alt="" title="' . $mime . '" src="' . $icon_url . '" />';
}
- サイトのキャッシュを消して、ファイルアイコンとファイルリンクが正常に表示されます
