Module:Icon: Difference between revisions

LVL (talk | contribs)
Cleaned up the code for displaying the icon text.
LVL (talk | contribs)
Fixed black icons not being inverted to white
Line 79: Line 79:
     -- Style logic
     -- Style logic
     local class = iconData.class or ""
     local class = iconData.class or ""
     local style = 'style="position:relative; bottom:2px;"'
     local extra = (class:find("invert", 1, true) and " filter:invert(1);" or "")
     if class == "theme" then
    local style
         style = 'class="module-icon-ability" style="position:relative; bottom:2px;"'
     if class:find("theme", 1, true) then
         style = 'class="module-icon-ability" style="position:relative; bottom:2px;' .. extra .. '"'
    else
        style = 'style="position:relative; bottom:2px;' .. extra .. '"'
     end
     end