<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://afropedia.world/index.php?action=history&amp;feed=atom&amp;title=Module%3AOptional_style</id>
	<title>Module:Optional style - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://afropedia.world/index.php?action=history&amp;feed=atom&amp;title=Module%3AOptional_style"/>
	<link rel="alternate" type="text/html" href="https://afropedia.world/index.php?title=Module:Optional_style&amp;action=history"/>
	<updated>2026-05-05T23:01:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://afropedia.world/index.php?title=Module:Optional_style&amp;diff=8540&amp;oldid=prev</id>
		<title>Djehuti: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://afropedia.world/index.php?title=Module:Optional_style&amp;diff=8540&amp;oldid=prev"/>
		<updated>2024-07-09T00:37:14Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--[=[&lt;br /&gt;
Simple module to construct a style attribute with an undefined number (including&lt;br /&gt;
zero) of CSS properties&lt;br /&gt;
]=]&lt;br /&gt;
&lt;br /&gt;
local p = {} --p stands for package&lt;br /&gt;
local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs&lt;br /&gt;
&lt;br /&gt;
--[=[&lt;br /&gt;
Construct the string from the given table of property:values&lt;br /&gt;
]=]&lt;br /&gt;
function p.make_style_string(properties)&lt;br /&gt;
	&lt;br /&gt;
	local out  = &amp;#039;&amp;#039;&lt;br /&gt;
	&lt;br /&gt;
	local num_processed = 0&lt;br /&gt;
	for k, v in pairs(properties) do&lt;br /&gt;
		if k ~= &amp;#039;style&amp;#039; and v~= &amp;#039;&amp;#039; then&lt;br /&gt;
			out = out .. k .. &amp;#039;:&amp;#039; .. v .. &amp;#039;;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if properties.style ~= nil and properties.style ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		out = out .. properties.style	&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if out == &amp;#039;&amp;#039; then&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return &amp;#039;style=&amp;quot;&amp;#039; .. out .. &amp;#039;&amp;quot;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[=[&lt;br /&gt;
The main entry function from templates&lt;br /&gt;
&lt;br /&gt;
Arguments are taken from both frame and parent argument lists&lt;br /&gt;
]=]&lt;br /&gt;
function p.optional_style(frame)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	return p.make_style_string(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Djehuti</name></author>
	</entry>
</feed>