<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: YUI CSS Min &#8211; part 2</title>
	<atom:link href="http://www.phpied.com/yui-css-min-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpied.com/yui-css-min-part-2/</link>
	<description>Stoyan&#039;s blog about &#60;a href=&#34;/category/xhtml&#34; class=&#34;tag-minor&#34;&#62;(x)html(5)&#60;/a&#62;, &#60;a href=&#34;/category/ajax&#34; class=&#34;tag-major&#34;&#62;ajax&#60;/a&#62;, &#60;a href=&#34;/category/bookmarklets&#34; class=&#34;tag-major&#34;&#62;bookmarklets&#60;/a&#62;, &#60;a href=&#34;/category/browsers&#34; class=&#34;tag-minor&#34;&#62;browsers&#60;/a&#62;, &#60;a href=&#34;/category/css&#34; class=&#34;tag-normal&#34;&#62;css&#60;/a&#62;, &#60;a href=&#34;/category/firebug&#34; class=&#34;tag-minor&#34;&#62;firebug&#60;/a&#62;, &#60;a href=&#34;/category/javascript&#34; class=&#34;tag-numero-uno&#34;&#62;javascript&#60;/a&#62;, &#60;a href=&#34;/category/json&#34; class=&#34;tag-normal&#34;&#62;json&#60;/a&#62;, &#60;a href=&#34;/category/mdb2&#34; class=&#34;tag-minor&#34;&#62;mdb2&#60;/a&#62;, &#60;a href=&#34;/category/mysql&#34; class=&#34;tag-normal&#34;&#62;mysql&#60;/a&#62;, &#60;a href=&#34;/category/pear&#34; class=&#34;tag-numero-uno&#34;&#62;pear&#60;/a&#62;, &#60;a href=&#34;/category/performance&#34; class=&#34;tag-major&#34;&#62;performance&#60;/a&#62;, &#60;a href=&#34;/category/php&#34; class=&#34;tag-numero-uno&#34;&#62;php&#60;/a&#62;, &#60;a href=&#34;/category/phpbb&#34; class=&#34;tag-major&#34;&#62;phpbb&#60;/a&#62;, &#60;a href=&#34;/category/tools&#34; class=&#34;tag-normal&#34;&#62;tools&#60;/a&#62;, &#60;a href=&#34;/category/yslow&#34; class=&#34;tag-minor&#34;&#62;yslow&#60;/a&#62;, &#60;a href=&#34;/category/yui&#34; class=&#34;tag-normal&#34;&#62;yui&#60;/a&#62;, &#60;a href=&#34;/category/writing&#34; class=&#34;tag-minor&#34;&#62;writing&#60;/a&#62;, &#60;a href=&#34;/category/music&#34; class=&#34;tag-major&#34;&#62;music&#60;/a&#62;,... &#60;a href=&#34;/category/life-and-everything&#34; class=&#34;tag-normal&#34;&#62;life and everything&#60;/a&#62;.</description>
	<lastBuildDate>Sat, 11 Feb 2012 14:07:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>By: Mathias</title>
		<link>http://www.phpied.com/yui-css-min-part-2/#comment-74289</link>
		<dc:creator>Mathias</dc:creator>
		<pubDate>Wed, 20 Oct 2010 12:38:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1418#comment-74289</guid>
		<description>Here’s another possible optimization:

&lt;code&gt;.test[foo=&#039;bar&#039;] { color: red; }&lt;/code&gt;

Compressed:

&lt;code&gt;.test[foo=&#039;bar&#039;]{color:red}&lt;/code&gt;

Could be:

&lt;code&gt;.test[foo=bar]{color:red}&lt;/code&gt;

Of course, YUI compressor should only remove the quotes around the attribute value in cases &lt;a href=&quot;http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier&quot; rel=&quot;nofollow&quot;&gt;where it’s allowed&lt;/a&gt; — e.g. if you have something like &lt;code&gt;a[href$=&#039;.pdf&#039;] { color: red; }&lt;/code&gt;, removing the quotes would make the CSS invalid (and it wouldn’t work in all browsers anymore).</description>
		<content:encoded><![CDATA[<p>Here’s another possible optimization:</p>
<p><code>.test[foo='bar'] { color: red; }</code></p>
<p>Compressed:</p>
<p><code>.test[foo='bar']{color:red}</code></p>
<p>Could be:</p>
<p><code>.test[foo=bar]{color:red}</code></p>
<p>Of course, YUI compressor should only remove the quotes around the attribute value in cases <a href="http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier" rel="nofollow">where it’s allowed</a> — e.g. if you have something like <code>a[href$='.pdf'] { color: red; }</code>, removing the quotes would make the CSS invalid (and it wouldn’t work in all browsers anymore).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stoyan</title>
		<link>http://www.phpied.com/yui-css-min-part-2/#comment-73109</link>
		<dc:creator>Stoyan</dc:creator>
		<pubDate>Fri, 28 May 2010 15:11:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1418#comment-73109</guid>
		<description>Excellent, thanks Matthias!</description>
		<content:encoded><![CDATA[<p>Excellent, thanks Matthias!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mathias</title>
		<link>http://www.phpied.com/yui-css-min-part-2/#comment-73108</link>
		<dc:creator>Mathias</dc:creator>
		<pubDate>Fri, 28 May 2010 12:56:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1418#comment-73108</guid>
		<description>Some additional optimizations:

&lt;code&gt;.test { border:none; }&lt;/code&gt;

Compressed:

&lt;code&gt;.test{border:none}&lt;/code&gt;

Could be:

&lt;code&gt;.test{border:0}&lt;/code&gt;

The same goes for other CSS properties that have a &lt;code&gt;none&lt;/code&gt; value but can also take numeric values.</description>
		<content:encoded><![CDATA[<p>Some additional optimizations:</p>
<p><code>.test { border:none; }</code></p>
<p>Compressed:</p>
<p><code>.test{border:none}</code></p>
<p>Could be:</p>
<p><code>.test{border:0}</code></p>
<p>The same goes for other CSS properties that have a <code>none</code> value but can also take numeric values.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stoyan</title>
		<link>http://www.phpied.com/yui-css-min-part-2/#comment-73079</link>
		<dc:creator>Stoyan</dc:creator>
		<pubDate>Thu, 27 May 2010 19:40:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1418#comment-73079</guid>
		<description>Thanks Emil, this is good stuff! I believe someone even committed a patch for shorthands.

Definitely going in the next release</description>
		<content:encoded><![CDATA[<p>Thanks Emil, this is good stuff! I believe someone even committed a patch for shorthands.</p>
<p>Definitely going in the next release</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emil</title>
		<link>http://www.phpied.com/yui-css-min-part-2/#comment-73074</link>
		<dc:creator>Emil</dc:creator>
		<pubDate>Thu, 27 May 2010 08:26:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1418#comment-73074</guid>
		<description>I noticed few areas that could be improved. All the tests are based on http://tools.w3clubs.com/cssmin/ 

Original:
.test1 {
margin: 10px 15px 8px 15px;
}

.test2 {
margin: 10px 15px 10px 15px;
}

Compressed:
.test1{margin:10px 15px 8px 15px}.test2{margin:10px 15px 10px 15px}

Could be:
.test1{margin:10px 15px 8px}.test2{margin:10px 15px}

It seems that margin:{x x x x} also does not become margin{x}</description>
		<content:encoded><![CDATA[<p>I noticed few areas that could be improved. All the tests are based on <a href="http://tools.w3clubs.com/cssmin/" rel="nofollow">http://tools.w3clubs.com/cssmin/</a> </p>
<p>Original:<br />
.test1 {<br />
margin: 10px 15px 8px 15px;<br />
}</p>
<p>.test2 {<br />
margin: 10px 15px 10px 15px;<br />
}</p>
<p>Compressed:<br />
.test1{margin:10px 15px 8px 15px}.test2{margin:10px 15px 10px 15px}</p>
<p>Could be:<br />
.test1{margin:10px 15px 8px}.test2{margin:10px 15px}</p>
<p>It seems that margin:{x x x x} also does not become margin{x}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stoyan</title>
		<link>http://www.phpied.com/yui-css-min-part-2/#comment-73000</link>
		<dc:creator>Stoyan</dc:creator>
		<pubDate>Fri, 21 May 2010 21:10:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1418#comment-73000</guid>
		<description>Sunnybear, that&#039;s cool, I thought CSSTidy was no longer being developed, happy to see the project is alive and kicking. Yes, I was using the PHP version for testing.</description>
		<content:encoded><![CDATA[<p>Sunnybear, that&#8217;s cool, I thought CSSTidy was no longer being developed, happy to see the project is alive and kicking. Yes, I was using the PHP version for testing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sunnybear</title>
		<link>http://www.phpied.com/yui-css-min-part-2/#comment-72998</link>
		<dc:creator>sunnybear</dc:creator>
		<pubDate>Fri, 21 May 2010 08:35:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1418#comment-72998</guid>
		<description>@Stoyan: not sure what version of CSS Tidy was used - because there has ben made some improvements, but we still can&#039;t sync C-branch with PHP-branch to release 1.3
CSS Tidy also can merge selectors and sort (yeah!) properties and selectors in alphabetic order.</description>
		<content:encoded><![CDATA[<p>@Stoyan: not sure what version of CSS Tidy was used &#8211; because there has ben made some improvements, but we still can&#8217;t sync C-branch with PHP-branch to release 1.3<br />
CSS Tidy also can merge selectors and sort (yeah!) properties and selectors in alphabetic order.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NICCAI</title>
		<link>http://www.phpied.com/yui-css-min-part-2/#comment-72997</link>
		<dc:creator>NICCAI</dc:creator>
		<pubDate>Fri, 21 May 2010 06:59:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1418#comment-72997</guid>
		<description>When evaluating CSS, I come across a lot of developers that default to color names.  It would be nice to regex out at least common values like black and white to #000 and #fff.</description>
		<content:encoded><![CDATA[<p>When evaluating CSS, I come across a lot of developers that default to color names.  It would be nice to regex out at least common values like black and white to #000 and #fff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arnout</title>
		<link>http://www.phpied.com/yui-css-min-part-2/#comment-72996</link>
		<dc:creator>Arnout</dc:creator>
		<pubDate>Fri, 21 May 2010 06:43:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1418#comment-72996</guid>
		<description>The only issue I once had with charsets is that Safari doesn&#039;t like @charset &quot;utf-8&quot;;rule{here:0px} It needs a space behind the charset ; or it will ignore the complete stylesheet.

So you might want to double check that if you are using charsets inside your stylesheets.</description>
		<content:encoded><![CDATA[<p>The only issue I once had with charsets is that Safari doesn&#8217;t like @charset &#8220;utf-8&#8243;;rule{here:0px} It needs a space behind the charset ; or it will ignore the complete stylesheet.</p>
<p>So you might want to double check that if you are using charsets inside your stylesheets.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stoyan</title>
		<link>http://www.phpied.com/yui-css-min-part-2/#comment-72994</link>
		<dc:creator>Stoyan</dc:creator>
		<pubDate>Fri, 21 May 2010 05:12:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1418#comment-72994</guid>
		<description>yes, I think CSS tidy is the most advanced, it parses the CSS, while YUI&#039;s css min is a bunch of regexp. I&#039;ve compared some here: 
http://www.phpied.com/reducing-tpayload/
YUI CSS min is a little better now than these measurements but just with about 2%

For background and font you mean using shorthands, right?

Sorry for the spam thingie, it&#039;s just some plugin I installed.</description>
		<content:encoded><![CDATA[<p>yes, I think CSS tidy is the most advanced, it parses the CSS, while YUI&#8217;s css min is a bunch of regexp. I&#8217;ve compared some here:<br />
<a href="http://www.phpied.com/reducing-tpayload/" rel="nofollow">http://www.phpied.com/reducing-tpayload/</a><br />
YUI CSS min is a little better now than these measurements but just with about 2%</p>
<p>For background and font you mean using shorthands, right?</p>
<p>Sorry for the spam thingie, it&#8217;s just some plugin I installed.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

