Module:Infobox: Difference between revisions
more rounded; editable title color |
titlebg light and dark mode |
||
| Line 12: | Line 12: | ||
:css('padding-bottom', '4px') | :css('padding-bottom', '4px') | ||
local titlebg = (args.titlebg and args.titlebg ~= '') and args.titlebg or 'var(--vw-accent-subtle)' | local titlebg | ||
if (args['titlebg-light'] and args['titlebg-light'] ~= '') or | |||
(args['titlebg-dark'] and args['titlebg-dark'] ~= '') then | |||
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)' | |||
titlebg = 'light-dark(' .. light .. ', ' .. dark .. ')' | |||
else | |||
titlebg = (args.titlebg and args.titlebg ~= '') and args.titlebg or 'var(--vw-accent-subtle)' | |||
end | |||
if args.title and args.title ~= '' then | if args.title and args.title ~= '' then | ||
root:tag('tr') | root:tag('tr') | ||