Module:Icon: Difference between revisions

Jump to navigation Jump to search
LVL (talk | contribs)
Undo revision 36291 by LVL (talk)
Tag: Undo
Put the "nowrap" around the icon and text – not just icon, it doesn't do anything that way
Line 72: Line 72:
     -- Style logic
     -- Style logic
     local class = iconData.class or ""
     local class = iconData.class or ""
     local style = 'style="white-space:nowrap; position:relative; bottom:2px;"'
     local style = 'style="position:relative; bottom:2px;"'
     if class == "theme" then
     if class == "theme" then
         style = 'class="module-icon-ability" style="white-space:nowrap; position:relative; bottom:2px;"'
         style = 'class="module-icon-ability" style="position:relative; bottom:2px;"'
     end
     end


Line 85: Line 85:


     local textHtml = (noLink or link == "") and finalText or string.format('[[%s|%s]]', link, finalText)
     local textHtml = (noLink or link == "") and finalText or string.format('[[%s|%s]]', link, finalText)
     return iconHtml .. " " .. textHtml
     return '<span style="white-space:nowrap;">' .. iconHtml .. " " .. textHtml .. '</span>'
end
end


return p
return p