Module:Icon: Difference between revisions

LVL (talk | contribs)
Fix ability link priority: prefer abilities linked to heroes over duplicate/orphan entries with same name
LVL (talk | contribs)
Remove inline invert filter for abilities; rely on CSS for ability icon color normalization
Line 234: Line 234:
     -- Style logic (only abilities get theme class by default)
     -- Style logic (only abilities get theme class by default)
     local class = iconData.class or ""
     local class = iconData.class or ""
    local extra = (class:find("invert", 1, true) and " filter:invert(1);" or "")
     local style
     local style
     if class:find("theme", 1, true) then
     if class:find("theme", 1, true) then
         style = 'class="module-icon-ability" style="position:relative; bottom:2px;' .. extra .. '"'
         style = 'class="module-icon-ability" style="position:relative; bottom:2px;"'
     else
     else
         style = 'style="position:relative; bottom:2px;' .. extra .. '"'
         style = 'style="position:relative; bottom:2px;"'
     end
     end