Difference between revisions of "Module:List"
Jump to navigation
Jump to search
Only use main <div> tag when necessary
en>Izno (use templatestyles in module:list) |
en>ExE Boss (Only use main <div> tag when necessary) |
||
Line 116: | Line 116: | ||
-- Render the main div tag. | -- Render the main div tag. | ||
local root = mw.html.create('div') | local root = mw.html.create(( | ||
#data.classes > 0 | |||
or data.marginLeft | |||
or data.style | |||
) and 'div' or nil) | |||
for i, class in ipairs(data.classes or {}) do | for i, class in ipairs(data.classes or {}) do | ||
root:addClass(class) | root:addClass(class) |