Module:Module sandbox
Appearance
local p = {}
function p.generateVariable(frame)
local variableName = frame.args.name
local variableValue = frame.args.value
if not variableName or not variableValue then
return '<span style="color: red;">Error: Both "name" and "value" parameters are required.</span>'
end
local css = ':root { ' .. variableName .. ': ' .. variableValue .. '; }'
local html = '<style>' .. css .. '</style>'
return html
end
return p