<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The True Tribe &#187; Search Results  &#187;  good styles css</title>
	<atom:link href="http://www.thetruetribe.com/?s=good+styles+css&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.thetruetribe.com</link>
	<description>Vroom! That&#039;s us leaving IE in the dust.</description>
	<lastBuildDate>Fri, 22 Jan 2010 23:34:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CSS Naming Convention Best Practices</title>
		<link>http://www.thetruetribe.com/2009/07/css-naming-convention-best-practices/</link>
		<comments>http://www.thetruetribe.com/2009/07/css-naming-convention-best-practices/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 05:34:33 +0000</pubDate>
		<dc:creator>grandecomplex</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[convention]]></category>
		<category><![CDATA[naming conventions]]></category>

		<guid isPermaLink="false">http://wordpress.thetruetribe.com/?p=57</guid>
		<description><![CDATA[When building components, it is important to follow a set of guidelines when naming your IDs and classes. This article will explore best practices in choosing CSS names.


When building components, it is important to follow a set of guidelines when naming your ids and classes.  The main reason behind being cautious is to keep [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: left;"><img src="/images/stories/internet_serious_business3.jpg" alt="" />When building components, it is important to follow a set of guidelines when naming your IDs and classes. This article will explore best practices in choosing CSS names.</div>
<p><span id="more-57"></span></p>
<p><img src="http://www.thetruetribe.com/images/stories/internet_serious_business3.jpg" alt="" /></p>
<p>When building components, it is important to follow a set of guidelines when naming your ids and classes.  The main reason behind being cautious is to keep your code reusable and updatable. Naming your rounded corner box “red-corner-box” in CSS is going to lead to trouble down the line. What if there are two red corner boxes with different shades of red? What if a year down the road the client’s shareholders think red is so 2008 and now they want it blue? Quickly we can see how being hasty with naming conventions can cause accidents down the line, and may cause the client to view you as unprofessionalism.<br />
Its best to ask yourself this golden question: Does the look and feel of a component extend to other similar areas of the site?<br />
Lets say for example the red rounded corner box is in the design for error messaging. All across the site wherever there is an error message the designer has made the boxes red with rounded corners. Thus the name for this component will be “error-messaging,” (see figure 1). If you cannot find a theme in the design you may need to talk to the designer to discover his/her intentions of that component in the design.</p>
<h3>Figure 1:</h3>
<p>Well-thought through naming conventions is a way of taking a step back from the design, and to look at it holistically rather than micro-analyzing every pixel. This becomes increasingly important when deciding on more ambiguous components. Gavin Suntop, at Pop Multimedia, chose the name “flex-box” for a general 1px gray rounded corner container used with a variety of content for a recent redesign. One general rule was to avoid the word “content” in the name.  Since there are many different kinds of content (e.g. login forms, homepage content containers, shopping cart buckets) it is good to avoid that word for describing a specific component when other components also use content. Flex-box is a unique name to describe a unique component. Once that component is named team members can discuss the component by its appropriate name rather than “red-corner-box,” and therefore increases communication efficiency. Imagine calling an ipod “small cool rounded-corner music player.”  The satisfaction of proper naming conventions shines when building a styleguide. A styleguide is a static one html page featuring all the different styles for an entire site. It usually features all the headers, typography, components, forms, widgets, and site chrome. A good e-commerce website’s styleguide’s component wrappers should look similar to this:</p>
<p>In most circumstances, new-to-the-project developers will immediately know how to use most of these components when comparing the html styleguide to a psd mockup. It passes the reusability test. A year from now when the error-messaging changes to blue the css, html, and image file names will not have to change because the naming conventions has semantic meaning rather than describing ephemeral visual characteristics.</p>
<p>If you have any suggestions or recommendations on naming convention best practices please leave a comment or email us!</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.thetruetribe.com%2F2009%2F07%2Fcss-naming-convention-best-practices%2F&amp;linkname=CSS%20Naming%20Convention%20Best%20Practices"><img src="http://www.thetruetribe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.thetruetribe.com/2009/07/css-naming-convention-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What Are Good Styles to Use in All CSS Stylesheets?</title>
		<link>http://www.thetruetribe.com/2008/04/what-are-good-styles-to-use-in-all-css-stylesheets/</link>
		<comments>http://www.thetruetribe.com/2008/04/what-are-good-styles-to-use-in-all-css-stylesheets/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 04:54:00 +0000</pubDate>
		<dc:creator>grandecomplex</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://wordpress.thetruetribe.com/?p=10</guid>
		<description><![CDATA[These are a list of styles you can&#8217;t live without. I suggest using these in all your stylesheets to help in a variety of situations.
Because headers matter A LOT in SEO. It is important to avoid using h1, h2, h3, etc for ambiguous content such as &#8220;Contact Me&#8221; or &#8220;Support&#8221; titles that sit at the [...]]]></description>
			<content:encoded><![CDATA[<p>These are a list of styles you <strong>can&#8217;t live without</strong>. I suggest using these in all your stylesheets to help in a variety of situations.<span id="more-10"></span></p>
<p>Because <strong>headers matter A LOT in SEO</strong>. It is important to <strong>avoid using h1, h2, h3, etc for ambiguous content</strong> such as &#8220;Contact Me&#8221; or &#8220;Support&#8221; titles that sit at the top of your page. What&#8217;s more important for <strong>headers is to use them for things specific to your site</strong>. For The True Tribe we would use headers for &#8220;CSS Good Practices&#8221; or &#8220;Alex Grande&#8221; , but not &#8220;Our Heros.&#8221; At least we should&#8230; The way around this is to make classes called h1, h2, h3, etc and give them properties that are similar to headers.</p>
<pre class="js:nocontrols">.h1 {
   font-size: 22px;
   font-weight: 600;
}

.h2 {
   font-size: 20px;
   font-weight: 600;
}

.h3 {
   font-size: 18px;
   font-weight: 600;
}

.h4 {
   font-size: 16px;
}

.h5 {
   font-size: 14px;
}</pre>
<p><strong>Other font related styles</strong> include, but not limited to&#8230;</p>
<pre class="js:nocontrols">.bold {
   font-weight: 600; /* I use this one a lot! Instead of using the b tag use
<span class="bold">I'm Bold</span>...that's what she said...*/
}

.underline {
   text-decoration: underline;
}</pre>
<p><strong>For positioning styles&#8230;</strong><br />
This is when all the children of a parent are removed from the page flow and need something to fill the wrapper parent.</p>
<pre class="js:nocontrols">.clearFix {
 clear: both;
 height: 0;
 width: 0;
 border: 0;
}</pre>
<p>There are more but these are ones I use almost everyday for my clients. I hope you&#8217;ll find it useful as well.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.thetruetribe.com%2F2008%2F04%2Fwhat-are-good-styles-to-use-in-all-css-stylesheets%2F&amp;linkname=What%20Are%20Good%20Styles%20to%20Use%20in%20All%20CSS%20Stylesheets%3F"><img src="http://www.thetruetribe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.thetruetribe.com/2008/04/what-are-good-styles-to-use-in-all-css-stylesheets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
