In user menu (Bartik theme) occurs duplicating icons, because of <li> and <a> uses the same class attribute.

Comments

oe.elvik’s picture

Status: Active » Needs review
StatusFileSize
new494 bytes

Wasn't able to reproduce the bug for the Bartik theme, but had the same problem in one of my custom theme. My bet is that this patch solves your problem as well. Now only <a> will get the icon added. I think this is the best overall solution.

EllECTRONC’s picture

You twice applying styles to <a>, as I see <a> always have class="menu-id"and <li> not.

So I think this will enough:

diff --git a/menu_icons_css_item.tpl.php b/menu_icons_css_item.tpl.php
index 3bc98a1..3e6d3e0 100755
@@ -15,7 +15,7 @@
-.menu-<?php print $mlid ?>, ul.links li.menu-<?php print $mlid ?> {
+a.menu-<?php print $mlid ?> {
oe.elvik’s picture

I guess the original idea was to include both selectors to support themes where the a dos not get the class but only the li item. I kept both selectors in my patch in order to jot introduce new bugs...

acrollet’s picture

The patch in #1 worked for me, and I prefer to minimize the chance of introducing a regression. Committed in http://drupalcode.org/project/menu_icons.git/commit/7a83a93

acrollet’s picture

Version: 7.x-3.0-alpha1 » 7.x-3.x-dev
Status: Needs review » Closed (fixed)