<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.perfecttower2.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ACSSUtil</id>
	<title>Module:CSSUtil - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.perfecttower2.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ACSSUtil"/>
	<link rel="alternate" type="text/html" href="https://www.perfecttower2.com/wiki/index.php?title=Module:CSSUtil&amp;action=history"/>
	<updated>2026-04-28T10:24:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.1</generator>
	<entry>
		<id>https://www.perfecttower2.com/wiki/index.php?title=Module:CSSUtil&amp;diff=4121&amp;oldid=prev</id>
		<title>Exe boss: Create Module:CSSUtil for use by Module:Factory slot and Module:UI</title>
		<link rel="alternate" type="text/html" href="https://www.perfecttower2.com/wiki/index.php?title=Module:CSSUtil&amp;diff=4121&amp;oldid=prev"/>
		<updated>2026-04-21T12:34:27Z</updated>

		<summary type="html">&lt;p&gt;Create &lt;a href=&quot;/wiki/Module:CSSUtil&quot; title=&quot;Module:CSSUtil&quot;&gt;Module:CSSUtil&lt;/a&gt; for use by &lt;a href=&quot;/wiki/Module:Factory_slot&quot; title=&quot;Module:Factory slot&quot;&gt;Module:Factory slot&lt;/a&gt; and &lt;a href=&quot;/wiki/Module:UI&quot; title=&quot;Module:UI&quot;&gt;Module:UI&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Utility for dealing with inline styles by checking&lt;br /&gt;
-- for CSS classes in a `class` argument.&lt;br /&gt;
--&lt;br /&gt;
-- Mainly exists to support inline style workarounds&lt;br /&gt;
-- until this Wiki gets [[mw:Extension:TemplateStyles|TemplateStyles]]&lt;br /&gt;
&lt;br /&gt;
require(&amp;quot;Module:No globals&amp;quot;);&lt;br /&gt;
local checkType = require(&amp;quot;libraryUtil&amp;quot;).checkType;&lt;br /&gt;
&lt;br /&gt;
local p = {};&lt;br /&gt;
&lt;br /&gt;
--- Returns whether the space separated&lt;br /&gt;
--- `classAttr` contains the `className`&lt;br /&gt;
---&lt;br /&gt;
--- @param classAttr string|nil the class attribute&lt;br /&gt;
--- @param className string the class name to look for&lt;br /&gt;
--- @return boolean&lt;br /&gt;
function p.hasClass(classAttr, className)&lt;br /&gt;
	checkType('&amp;quot;Module:CSSUtil&amp;quot;.hasClass', 1, classAttr, &amp;quot;string&amp;quot;, true);&lt;br /&gt;
	checkType('&amp;quot;Module:CSSUtil&amp;quot;.hasClass', 2, className, &amp;quot;string&amp;quot;);&lt;br /&gt;
	-- assert(not className:find(&amp;quot;%s&amp;quot;), 'Class name must not contain whitespace, got: &amp;quot;' .. className .. '&amp;quot;');&lt;br /&gt;
&lt;br /&gt;
	if (not classAttr) then&lt;br /&gt;
		return false;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	for cls in mw.text.gsplit(classAttr, &amp;quot;%s+&amp;quot;) do&lt;br /&gt;
		if (cls == className) then&lt;br /&gt;
			return true;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return false;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p;&lt;/div&gt;</summary>
		<author><name>Exe boss</name></author>
		
	</entry>
</feed>