Module:Icons: Difference between revisions

Use class in place of inline styles
(Use inline-flex instead of inline-block; reverse order of amount & image for _Currency)
(Use class in place of inline styles)
Line 789: Line 789:


if menu then
if menu then
return '{| class="articletable" style="display:inline-flex;vertical-align:middle;"\r\n|-\r\n|' .. expIcon .. resultText .. '\r\n|}'
return '{| class="articletable img-text" style="vertical-align:middle;"\r\n|-\r\n|' .. expIcon .. resultText .. '\r\n|}'
elseif not noicon and not nospan then
elseif not noicon and not nospan then
return '<span style="display:inline-flex">' .. expIcon .. resultText .. '</span>'
return '<span class="img-text">' .. expIcon .. resultText .. '</span>'
else
else
return resultText
return resultText
Line 810: Line 810:
result = result.." Level "..level
result = result.." Level "..level


result = '<span style="display:inline-flex">'..result..'</span>'
result = '<span class="img-text">'..result..'</span>'
return result
return result
end
end
Line 837: Line 837:
result = result..p.Icon({linkname, img=iconname, type='item', notext=true, nospan=true, alt=altTextItem})..p.Icon({'Mastery', notext=true, nospan=true, alt=altTextMastery})
result = result..p.Icon({linkname, img=iconname, type='item', notext=true, nospan=true, alt=altTextItem})..p.Icon({'Mastery', notext=true, nospan=true, alt=altTextMastery})
if showText then result = result..'[['..linkname..']] [[Mastery]]' end
if showText then result = result..'[['..linkname..']] [[Mastery]]' end
result = '<span style="display:inline-flex">'..result..'</span>'
result = '<span class="img-text">'..result..'</span>'
return result
return result
end
end
Line 851: Line 851:
function p._Currency(fileName, link, altText, amount, maxAmount)
function p._Currency(fileName, link, altText, amount, maxAmount)
local ret = {}
local ret = {}
table.insert(ret, '<span style="display:inline-flex">')
table.insert(ret, '<span class="img-text">')
local sep = ''
local sep = ''
-- Currency amounts
-- Currency amounts