Module:Infobox: Difference between revisions
more rounded; editable title color |
padding 0.5em 1em |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 12: | Line 12: | ||
:css('padding-bottom', '4px') | :css('padding-bottom', '4px') | ||
local titlebg = (args | local light = (args['titlebg-light'] and args['titlebg-light'] ~= '') and args['titlebg-light'] or 'var(--vw-accent-subtle)' | ||
local dark = (args['titlebg-dark'] and args['titlebg-dark'] ~= '') and args['titlebg-dark'] or 'var(--vw-accent-subtle)' | |||
local titlebg = 'light-dark(' .. light .. ', ' .. dark .. ')' | |||
if args.title and args.title ~= '' then | if args.title and args.title ~= '' then | ||
root:tag('tr') | root:tag('tr') | ||
| Line 21: | Line 24: | ||
:css('font-size', '125%') | :css('font-size', '125%') | ||
:css('background', titlebg) | :css('background', titlebg) | ||
:css('padding', ' | :css('padding', '0.5em 1em') | ||
:wikitext(args.title) | :wikitext(args.title) | ||
end | end | ||