Bureaucrats, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, translator, Widget editors
154
edits
(Add inline support by `{{Stack|...|inline = True}}`) |
(Better inlining that actually works) |
||
Line 52: | Line 52: | ||
local tagtype | local tagtype | ||
if inline then | local sprite = require([[Module:Sprite]]) | ||
:new("inventory") | |||
:setItem(mw.text.trim(args[1] or "")) | |||
if args['small'] or args['Small'] then | |||
sprite:SetSize(16) | |||
end | |||
local spriteDiv = sprite:GenerateHTML() | |||
if args['inline'] or args['Inline'] then | |||
spriteDiv:css("display","inline-block") | |||
spriteDiv:css("vertical-align","middle") | |||
end | end | ||
edits