Module:Optional style: Difference between revisions
remove unused variable
m (1 revision imported) |
enws>CalendulaAsteraceae (remove unused variable) |
||
| Line 1: | Line 1: | ||
--[=[ | --[=[ | ||
Simple module to construct a style attribute with an undefined number (including | Simple module to construct a style attribute | ||
zero) of CSS properties | with an undefined number (including zero) of CSS properties | ||
]=] | ]=] | ||
| Line 8: | Line 8: | ||
--[=[ | --[=[ | ||
Construct the string from the given table of property:values | Construct the string from the given table of property:values | ||
]=] | ]=] | ||
function p.make_style_string(properties) | function p.make_style_string(properties) | ||
local out = '' | local out = '' | ||
for k, v in pairs(properties) do | for k, v in pairs(properties) do | ||
if k ~= 'style' and v~= '' then | if k ~= 'style' and v~= '' then | ||
| Line 33: | Line 31: | ||
--[=[ | --[=[ | ||
The main entry function from templates | The main entry function from templates | ||
Arguments are taken from both frame and parent argument lists | Arguments are taken from both frame and parent argument lists | ||
]=] | ]=] | ||
function p.optional_style(frame) | function p.optional_style(frame) | ||