<?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: Documenting CSS</title>
	<atom:link href="http://friendlybit.com/css/documenting-css/feed/" rel="self" type="application/rss+xml" />
	<link>http://friendlybit.com/css/documenting-css/</link>
	<description>Strategic web development</description>
	<lastBuildDate>Tue, 08 May 2012 22:48:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Emil Stenström</title>
		<link>http://friendlybit.com/css/documenting-css/#comment-30384</link>
		<dc:creator>Emil Stenström</dc:creator>
		<pubDate>Fri, 29 Feb 2008 08:08:53 +0000</pubDate>
		<guid isPermaLink="false">http://friendlybit.com/css/documenting-css/#comment-30384</guid>
		<description>@Andreas: Yes, I really need a wider commenting area...</description>
		<content:encoded><![CDATA[<p>@Andreas: Yes, I really need a wider commenting area&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emil Stenström</title>
		<link>http://friendlybit.com/css/documenting-css/#comment-30383</link>
		<dc:creator>Emil Stenström</dc:creator>
		<pubDate>Fri, 29 Feb 2008 08:08:32 +0000</pubDate>
		<guid isPermaLink="false">http://friendlybit.com/css/documenting-css/#comment-30383</guid>
		<description>@Jens Wedin, Andreas: Thanks for all those great links and structuring tips, I&#039;ll look into them for my next project!</description>
		<content:encoded><![CDATA[<p>@Jens Wedin, Andreas: Thanks for all those great links and structuring tips, I&#8217;ll look into them for my next project!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas</title>
		<link>http://friendlybit.com/css/documenting-css/#comment-30375</link>
		<dc:creator>Andreas</dc:creator>
		<pubDate>Thu, 28 Feb 2008 17:20:50 +0000</pubDate>
		<guid isPermaLink="false">http://friendlybit.com/css/documenting-css/#comment-30375</guid>
		<description>Ah yes, in some cases I use a class rather than an ID as well if the module (or service (that&#039;s a new one to me, everybody here (Y!) says &quot;modules&quot;)) will be included more than once.

In some cases tho, like an article-listing I&#039;d consider the article-listing to be the module, not the article(s), so i&#039;ll have a div#article-listing wrapped around all the articles, and each article gets a div#article-1234 as well, rather than just a row of div.article:s.

I try to steer clear of classes as much as possible. I don&#039;t know why really but I rarely see them used in a way that&#039;s actually relevant to the HTML.

In most cases classes represent too much design/behavior (.box, .left etc) for me to feel comfortable using them.

The div[id] around the module adds to the structure of the HTML and is not there for styling but only for consistency and structure.

Fact is &lt;a href=&quot;http://code.google.com/p/aframework/&quot; rel=&quot;nofollow&quot;&gt;my framework&lt;/a&gt; automatically adds wrapper divs around modules, this is great when you&#039;re updating a module using ajax and you want to fetch it without the wrapper-div because you&#039;re actually putting the response in the wrapper-div and should it contain a wrapper-div you&#039;ll end up with nested divs with the same IDs.

Obviously it all depends on how you use classes, but to me IDs make more sense to wrap modules.

Think I just increased Friendlybit&#039;s height by another 400px with this comment :). Perhaps a little wider comment-area in the coming design?</description>
		<content:encoded><![CDATA[<p>Ah yes, in some cases I use a class rather than an ID as well if the module (or service (that&#8217;s a new one to me, everybody here (Y!) says &#8220;modules&#8221;)) will be included more than once.</p>
<p>In some cases tho, like an article-listing I&#8217;d consider the article-listing to be the module, not the article(s), so i&#8217;ll have a div#article-listing wrapped around all the articles, and each article gets a div#article-1234 as well, rather than just a row of div.article:s.</p>
<p>I try to steer clear of classes as much as possible. I don&#8217;t know why really but I rarely see them used in a way that&#8217;s actually relevant to the HTML.</p>
<p>In most cases classes represent too much design/behavior (.box, .left etc) for me to feel comfortable using them.</p>
<p>The div[id] around the module adds to the structure of the HTML and is not there for styling but only for consistency and structure.</p>
<p>Fact is <a href="http://code.google.com/p/aframework/" rel="nofollow">my framework</a> automatically adds wrapper divs around modules, this is great when you&#8217;re updating a module using ajax and you want to fetch it without the wrapper-div because you&#8217;re actually putting the response in the wrapper-div and should it contain a wrapper-div you&#8217;ll end up with nested divs with the same IDs.</p>
<p>Obviously it all depends on how you use classes, but to me IDs make more sense to wrap modules.</p>
<p>Think I just increased Friendlybit&#8217;s height by another 400px with this comment :). Perhaps a little wider comment-area in the coming design?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madr</title>
		<link>http://friendlybit.com/css/documenting-css/#comment-30371</link>
		<dc:creator>madr</dc:creator>
		<pubDate>Thu, 28 Feb 2008 14:59:48 +0000</pubDate>
		<guid isPermaLink="false">http://friendlybit.com/css/documenting-css/#comment-30371</guid>
		<description>@Andreas, I work like that too, except I mark up every modules (or service, as it is called in our current project) with classes instead. 
The CM lets the subscriber publish multiple instances of each service on a page, and this makes it impossible to mark services with unique IDs. :(</description>
		<content:encoded><![CDATA[<p>@Andreas, I work like that too, except I mark up every modules (or service, as it is called in our current project) with classes instead.<br />
The CM lets the subscriber publish multiple instances of each service on a page, and this makes it impossible to mark services with unique IDs. :(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas</title>
		<link>http://friendlybit.com/css/documenting-css/#comment-30366</link>
		<dc:creator>Andreas</dc:creator>
		<pubDate>Thu, 28 Feb 2008 11:24:04 +0000</pubDate>
		<guid isPermaLink="false">http://friendlybit.com/css/documenting-css/#comment-30366</guid>
		<description>I always structure my CSS like I structure all my code; modular.

Each module gets its own CSS-file. Any selector in a module-CSS must start with that module&#039;s ID-name (every module has a div with an ID of the same name as the module (div#recent-comments for example)).

Module-files should _never_ style generic classes or elements. Everything should go through the #module-id.

This way modules cannot mess with other modules and you know that if there&#039;s a layout-issue with the &quot;Recent comments&quot;-module you look in the recent-comments.css-file.

Generic styling and reseting/styling of basic elements is all done in general.css.

Sometimes I have a site.css which styles the header, navigation, content, sub-content and footer-modules in one file. It&#039;s sometimes easier to get an overview of the design if they&#039;re all in the same file.

I&#039;ve also written my own  &lt;a href=&quot;http://exscale.se/archives/2008/01/15/css-constants-and-compression-php-class/&quot; rel=&quot;nofollow&quot;&gt;constant-parser&lt;/a&gt; that removes the need for CSS-classes, and I save nifty constants in constants.css (or, if it gets massive I start dividing that up as well depending on what type of constant it is (list-styles, table-styles, div-styles, icons).

After working on 150+ modules-sites for 2 years this is easily the most straight-forward, easy-to-grasp way of structuring your CSS and it leaves you with very few bugs.

How annoying isn&#039;t it when you fix a bug in one module only to introduce a new one in another? Structuring your code like this will eliminate problems like that.</description>
		<content:encoded><![CDATA[<p>I always structure my CSS like I structure all my code; modular.</p>
<p>Each module gets its own CSS-file. Any selector in a module-CSS must start with that module&#8217;s ID-name (every module has a div with an ID of the same name as the module (div#recent-comments for example)).</p>
<p>Module-files should _never_ style generic classes or elements. Everything should go through the #module-id.</p>
<p>This way modules cannot mess with other modules and you know that if there&#8217;s a layout-issue with the &#8220;Recent comments&#8221;-module you look in the recent-comments.css-file.</p>
<p>Generic styling and reseting/styling of basic elements is all done in general.css.</p>
<p>Sometimes I have a site.css which styles the header, navigation, content, sub-content and footer-modules in one file. It&#8217;s sometimes easier to get an overview of the design if they&#8217;re all in the same file.</p>
<p>I&#8217;ve also written my own  <a href="http://exscale.se/archives/2008/01/15/css-constants-and-compression-php-class/" rel="nofollow">constant-parser</a> that removes the need for CSS-classes, and I save nifty constants in constants.css (or, if it gets massive I start dividing that up as well depending on what type of constant it is (list-styles, table-styles, div-styles, icons).</p>
<p>After working on 150+ modules-sites for 2 years this is easily the most straight-forward, easy-to-grasp way of structuring your CSS and it leaves you with very few bugs.</p>
<p>How annoying isn&#8217;t it when you fix a bug in one module only to introduce a new one in another? Structuring your code like this will eliminate problems like that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jens Wedin</title>
		<link>http://friendlybit.com/css/documenting-css/#comment-30364</link>
		<dc:creator>Jens Wedin</dc:creator>
		<pubDate>Thu, 28 Feb 2008 09:09:40 +0000</pubDate>
		<guid isPermaLink="false">http://friendlybit.com/css/documenting-css/#comment-30364</guid>
		<description>Good write-up. This is really important when leaving your precious style file to another developer. Just the &quot;Where do I add my own stuff&quot; is good. A good thing if you don´t use your own &quot;framework&quot; that you can reuse in every project is to have a look at other frameworks like Blueprint. There are some nice stuff that you can be inspired of like structure and documentation. I would also recommend to have a look at minify. It combines, minifies, removes comments etc with multiple css files. The good thing is that you can work a lot with comments within the file, minify then removes this on the fly and makes a cached copy of the file. It also have a bunch of other great stuff in it.

Here&#039;s an example of my css and the minified copy

http://jedisthlm.com/wp-content/themes/jedisthlmV/screen.css
http://jedisthlm.com/minify.php?files=/wp-content/themes/jedisthlmV/screen.css

http://code.google.com/p/minify/
http://code.google.com/p/blueprintcss/</description>
		<content:encoded><![CDATA[<p>Good write-up. This is really important when leaving your precious style file to another developer. Just the &#8220;Where do I add my own stuff&#8221; is good. A good thing if you don´t use your own &#8220;framework&#8221; that you can reuse in every project is to have a look at other frameworks like Blueprint. There are some nice stuff that you can be inspired of like structure and documentation. I would also recommend to have a look at minify. It combines, minifies, removes comments etc with multiple css files. The good thing is that you can work a lot with comments within the file, minify then removes this on the fly and makes a cached copy of the file. It also have a bunch of other great stuff in it.</p>
<p>Here&#8217;s an example of my css and the minified copy</p>
<p><a href="http://jedisthlm.com/wp-content/themes/jedisthlmV/screen.css" rel="nofollow">http://jedisthlm.com/wp-content/themes/jedisthlmV/screen.css</a><br />
<a href="http://jedisthlm.com/minify.php?files=/wp-content/themes/jedisthlmV/screen.css" rel="nofollow">http://jedisthlm.com/minify.php?files=/wp-content/themes/jedisthlmV/screen.css</a></p>
<p><a href="http://code.google.com/p/minify/" rel="nofollow">http://code.google.com/p/minify/</a><br />
<a href="http://code.google.com/p/blueprintcss/" rel="nofollow">http://code.google.com/p/blueprintcss/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madr</title>
		<link>http://friendlybit.com/css/documenting-css/#comment-30359</link>
		<dc:creator>madr</dc:creator>
		<pubDate>Wed, 27 Feb 2008 23:11:34 +0000</pubDate>
		<guid isPermaLink="false">http://friendlybit.com/css/documenting-css/#comment-30359</guid>
		<description>Great list! I have been n a similar situation about documenting JavaScript. This list can be applied to that one too. 
Another thing worth menioning is CSStidy, which can clean up and sort CSS when development is done. It can be a toll to keep CSS consistent.

(fyi: I read this article and wrote this comment on lynx, since I doing som server confs at the moment. Works just fine.)</description>
		<content:encoded><![CDATA[<p>Great list! I have been n a similar situation about documenting JavaScript. This list can be applied to that one too.<br />
Another thing worth menioning is CSStidy, which can clean up and sort CSS when development is done. It can be a toll to keep CSS consistent.</p>
<p>(fyi: I read this article and wrote this comment on lynx, since I doing som server confs at the moment. Works just fine.)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced (User agent is rejected)
Database Caching 2/10 queries in 0.002 seconds using disk: basic
Object Caching 287/294 objects using disk: basic

Served from: friendlybit.com @ 2012-05-22 08:53:01 -->
