Module:Navbox/sandbox: Difference between revisions

Content deleted Content added
div instead of table (role=navigation sometimes conflicts with tables containing th's)
sync from live version
Line 278:
for key, style in pairs(args) do
if tostring(key):match("style$") then
if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then
return true
end
Line 313:
:addClass(args.bodyclass)
 
if args.title and (args.state ~= 'plain' and args.state ~= 'off') then
tbl
-- :addClass('collapsible')
--:addClass(args.state or 'autocollapse')
end
:addClass('mw-collapsible')
-- mw-collapsible doesn't have an "autocollapse" feature, so fall
-- back on collapsed by default for now
:addClass(args.state and 'mw-' .. args.state or 'mw-collapsed')
end
 
tbl:css('border-spacing', 0)
Line 375 ⟶ 371:
else
res
:tag('divtable')
:addClass('navbox')
:css('border-spacing', 0)
:cssText(args.bodystyle)
:cssText(args.style)
:tag('tr')
:attr('role', 'navigation') -- <http://www.w3.org/TR/wai-aria/roles#navigation>
:csstag('padding', '4pxtd')
:nodecss(tbl'padding', '2px')
:node(tbl)
end