--[=[Simple module to construct a style attribute with an undefined number (includingzero) of CSS properties]=]localp={}--p stands for packagelocalgetArgs=require('Module:Arguments').getArgs--[=[Construct the string from the given table of property:values]=]functionp.make_style_string(properties)localout=''localnum_processed=0fork,vinpairs(properties)doifk~='style'andv~=''thenout=out..k..':'..v..';'endendifproperties.style~=nilandproperties.style~=''thenout=out..properties.styleendifout==''thenreturn''endreturn'style="'..out..'"'end--[=[The main entry function from templatesArguments are taken from both frame and parent argument lists]=]functionp.optional_style(frame)localargs=getArgs(frame)returnp.make_style_string(args)endreturnp