Difference between revisions of "Module:List"

Jump to navigation Jump to search
78 bytes added ,  08:36, 18 July 2021
Only use main <div> tag when necessary
>Izno
(use templatestyles in module:list)
>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)
Anonymous user

Navigation menu