Module:Navbox/sandbox: Difference between revisions

Content deleted Content added
m outer div padding fix
scratch border-spacing, try margin-top instead
Line 106:
:addClass('navbox-group')
:addClass(args.titlegroupclass)
:css('margin-top', '.15em')
:cssText(args.basestyle)
:cssText(args.groupstyle)
Line 112 ⟶ 113:
end
 
local titleCell = titleRow:tag('th'):attr('scope', 'col'):css('margin-top', '.15em')
 
if args.titlegroup then
Line 160 ⟶ 161:
:addClass('navbox-abovebelow')
:addClass(args.aboveclass)
:css('margin-top', '.15em')
:cssText(args.basestyle)
:cssText(args.abovestyle)
Line 174 ⟶ 176:
:addClass('navbox-abovebelow')
:addClass(args.belowclass)
:css('margin-top', '.15em')
:cssText(args.basestyle)
:cssText(args.belowstyle)
Line 192 ⟶ 195:
:addClass('navbox-image')
:addClass(args.imageclass)
:css('margin-top', '.15em')
:css('width', '0%')
:css('padding', '0px 2px 0px 0px')
Line 201 ⟶ 205:
 
if args['group' .. listnum] then
local groupCell = row:tag('th'):css('margin-top', '.15em')
 
groupCell
Line 219 ⟶ 223:
end
 
local listCell = row:tag('td'):css('margin-top', '.15em')
 
if args['group' .. listnum] then
Line 248 ⟶ 252:
end
listCell
:css('padding', (index == 1 and args.list1padding) or args.listpadding or '0 0.25em0px')
:cssText(args.liststyle)
:cssText(rowstyle)
Line 255 ⟶ 259:
:addClass('navbox-' .. oddEven)
:addClass(args.listclass)
:tag('div')
:wikitext(processItem(listText, args.nowrapitems))
:css('padding', (index == 1 and args.list1padding) or args.listpadding or '0em 0.25em')
:wikitext(processItem(listText, args.nowrapitems))
 
if index == 1 and args.image then
Line 262 ⟶ 268:
:addClass('navbox-image')
:addClass(args.imageclass)
:css('margin-top', '.15em')
:css('width', '0%')
:css('padding', '0px 0px 0px 2px')
Line 342 ⟶ 349:
end
 
tbl:css('border-spacing', '0 .2em'):css('margin', '-.1em -.25em')
if border == 'subgroup' or border == 'none' then
tbl
Line 397 ⟶ 404:
end
elseif border == 'subgroup' then
-- We assume that this navbox is being rendered in a list cell of a parent navbox, and is
-- therefore inside a div with padding:0em 0.25em. We start with a </div> to avoid the
-- padding being applied, and at the end add a <div> to balance out the parent's </div>
res
:wikitext('</div>')
:node(tbl)
:wikitext('<div>')
else
local nav = res:tag('div')
Line 405 ⟶ 417:
:cssText(args.bodystyle)
:cssText(args.style)
:css('padding', '.15em 01em .15em25em .5em25em')
:node(tbl)
if args.title then