Module:Icon: Difference between revisions

LVL (talk | contribs)
Forced all ability icons to render as white using a CSS filter
LVL (talk | contribs)
Undo revision 36291 by LVL (talk)
Tag: Undo
Line 72: Line 72:
     -- Style logic
     -- Style logic
     local class = iconData.class or ""
     local class = iconData.class or ""
     local style
     local style = 'style="white-space:nowrap; position:relative; bottom:2px;"'
     if class == "theme" then
     if class == "theme" then
        -- This is an ability icon. Apply the class and the white filter.
         style = 'class="module-icon-ability" style="white-space:nowrap; position:relative; bottom:2px;"'
         style = 'class="module-icon-ability" style="white-space:nowrap; position:relative; bottom:2px; filter: brightness(0) invert(1);"'
    else
        -- This is a standard icon. Do not apply the filter.
        style = 'style="white-space:nowrap; position:relative; bottom:2px;"'
     end
     end