<?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: Semantic CSS naming best practices</title>
	<atom:link href="http://blog.mixu.net/2009/08/12/semantic-css-naming-best-practices/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mixu.net/2009/08/12/semantic-css-naming-best-practices/</link>
	<description>When I read what I write I learn what I think</description>
	<lastBuildDate>Mon, 06 Sep 2010 09:54:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Better web application interface markup: lessons from theme frameworks &#171; Mixu&#039;s tech blog</title>
		<link>http://blog.mixu.net/2009/08/12/semantic-css-naming-best-practices/#comment-6699</link>
		<dc:creator>Better web application interface markup: lessons from theme frameworks &#171; Mixu&#039;s tech blog</dc:creator>
		<pubDate>Tue, 20 Jul 2010 10:24:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mixu.net/?p=372#comment-6699</guid>
		<description>[...] I spend a while (re)thinking what the layout structure should be in terms of CSS and HTML (e.g. semantic naming, organizing CSS [...]</description>
		<content:encoded><![CDATA[<p>[...] I spend a while (re)thinking what the layout structure should be in terms of CSS and HTML (e.g. semantic naming, organizing CSS [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 10-month retrospective on writing this blog &#124; Mixu&#39;s blog</title>
		<link>http://blog.mixu.net/2009/08/12/semantic-css-naming-best-practices/#comment-4996</link>
		<dc:creator>10-month retrospective on writing this blog &#124; Mixu&#39;s blog</dc:creator>
		<pubDate>Sat, 20 Mar 2010 21:39:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mixu.net/?p=372#comment-4996</guid>
		<description>[...] with. I find myself referring back to my own posts (e.x. on how to setup DKIM on Centos, or how to implement semantic naming in CSS), which I think is an indication that what I write has longer-lasting value to [...]</description>
		<content:encoded><![CDATA[<p>[...] with. I find myself referring back to my own posts (e.x. on how to setup DKIM on Centos, or how to implement semantic naming in CSS), which I think is an indication that what I write has longer-lasting value to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://blog.mixu.net/2009/08/12/semantic-css-naming-best-practices/#comment-865</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 10 Sep 2009 05:39:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mixu.net/?p=372#comment-865</guid>
		<description>So for IE7 you might have rules like: body[id^=controller] { shared style specs } and body[id^=controller-action] { style for individual page } and body[id=controller-action-page-2] { style for page one of the action }.

I am still supporting IE6 in most of my work, however, so I have not tested this out that much.</description>
		<content:encoded><![CDATA[<p>So for IE7 you might have rules like: body[id^=controller] { shared style specs } and body[id^=controller-action] { style for individual page } and body[id=controller-action-page-2] { style for page one of the action }.</p>
<p>I am still supporting IE6 in most of my work, however, so I have not tested this out that much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://blog.mixu.net/2009/08/12/semantic-css-naming-best-practices/#comment-864</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Wed, 09 Sep 2009 23:34:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mixu.net/?p=372#comment-864</guid>
		<description>Strictly speaking I would prefer not having #header-navigation and #footer-navigation, because these names are based on the location of the navigation content, rather than purely semantic. The prefix is a bit redundant.

If you have navigation links at the top and bottom of a page, why not make a .navigation -class, and have that inside the #header and #footer. That way you can have for example: #header .navigation a and #footer .navigation a. (Or perhaps #content .paging for something like a paging control.). This way the class name/ID does not need to change completely (just the CSS), even if you decide to move the navigation out of the header, and you can have shared properties for the &quot;base&quot; class.

Body ID is probably the hardest one to answer properly. The choice of naming scheme really depends on whether the majority of your content needs to be tweaked on a page-by-page or a controller-by-controller basis. When CSS3 selectors become supported in IE (http://www.456bereastreet.com/archive/200601/css_3_selectors_explained/), it will be possible to do a &quot;id begins with X&quot; -type match, at which point I think the long &quot;controller-action-extra&quot; form will be preferred. (http://msdn.microsoft.com/en-us/library/cc351024(VS.85).aspx )

Right now, if you need IE6 support, you need to trade off between the two. With a IE7 minimum, you can use &quot;&#124;=&quot; or &quot;^=&quot; and can use either plain &quot;controller&quot; or &quot;controller-action-..&quot;.</description>
		<content:encoded><![CDATA[<p>Strictly speaking I would prefer not having #header-navigation and #footer-navigation, because these names are based on the location of the navigation content, rather than purely semantic. The prefix is a bit redundant.</p>
<p>If you have navigation links at the top and bottom of a page, why not make a .navigation -class, and have that inside the #header and #footer. That way you can have for example: #header .navigation a and #footer .navigation a. (Or perhaps #content .paging for something like a paging control.). This way the class name/ID does not need to change completely (just the CSS), even if you decide to move the navigation out of the header, and you can have shared properties for the &#8220;base&#8221; class.</p>
<p>Body ID is probably the hardest one to answer properly. The choice of naming scheme really depends on whether the majority of your content needs to be tweaked on a page-by-page or a controller-by-controller basis. When CSS3 selectors become supported in IE (<a href="http://www.456bereastreet.com/archive/200601/css_3_selectors_explained/" rel="nofollow">http://www.456bereastreet.com/archive/200601/css_3_selectors_explained/</a>), it will be possible to do a &#8220;id begins with X&#8221; -type match, at which point I think the long &#8220;controller-action-extra&#8221; form will be preferred. (<a href="http://msdn.microsoft.com/en-us/library/cc351024(VS.85" rel="nofollow">http://msdn.microsoft.com/en-us/library/cc351024(VS.85</a>).aspx )</p>
<p>Right now, if you need IE6 support, you need to trade off between the two. With a IE7 minimum, you can use &#8220;|=&#8221; or &#8220;^=&#8221; and can use either plain &#8220;controller&#8221; or &#8220;controller-action-..&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ellisgl</title>
		<link>http://blog.mixu.net/2009/08/12/semantic-css-naming-best-practices/#comment-859</link>
		<dc:creator>ellisgl</dc:creator>
		<pubDate>Wed, 09 Sep 2009 22:56:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mixu.net/?p=372#comment-859</guid>
		<description>If you have navigation links at the top and bottom - why not do #header-navigation and #footer-navigation?
Also with the body id. I was thinking of different of controller-action-extra - ie index-page-2.

Your thoughts?</description>
		<content:encoded><![CDATA[<p>If you have navigation links at the top and bottom &#8211; why not do #header-navigation and #footer-navigation?<br />
Also with the body id. I was thinking of different of controller-action-extra &#8211; ie index-page-2.</p>
<p>Your thoughts?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
