<?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>Joe Song &#187; CSS</title> <atom:link href="http://joesong.com/tag/css/feed/" rel="self" type="application/rss+xml" /><link>http://joesong.com</link> <description>Development, music.</description> <lastBuildDate>Tue, 22 Jun 2010 04:37:09 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0</generator> <item><title>HTML and CSS Development Guidelines</title><link>http://joesong.com/2010/02/html-and-css-development-guidelines/</link> <comments>http://joesong.com/2010/02/html-and-css-development-guidelines/#comments</comments> <pubDate>Thu, 18 Feb 2010 17:23:29 +0000</pubDate> <dc:creator>josephsong</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[html]]></category> <category><![CDATA[optimization]]></category> <category><![CDATA[performance]]></category> <category><![CDATA[programming]]></category> <category><![CDATA[progressive enhancement]]></category><guid
isPermaLink="false">http://joesong.com/?p=925</guid> <description><![CDATA[Some rules for HTML and CSS development based on success in the field.]]></description> <content:encoded><![CDATA[<p>*NOTE &#8211; Feb 18, 2010: this is a work in progress. Very likely, there are points not yet included.</p><h2>Philosophical Approach</h2><p>The approach can be summed up in two points:</p><ol
class="default_list"><li>Write enough markup and style definitions to make it clear to other developers what is happening.</li><li>Write as little markup and style definitions as possible.</li></ol><p>Let’s talk about what these mean.</p><h5>Write enough markup and style definitions to make it clear to other developers what is happening.</h5><p>We follow the principles of semantic web development which involves using markup to describe the data or content of a web page. In practice, this means things like using <code>ol</code> and <code>ul</code> tags to make lists of items instead of text delineated with <code>br</code> tags, and giving page elements class names that describe their function (eg “<code>article-wrapper</code>”) instead of class names that describe their appearance (eg “<code>blue-background</code>”).</p><h5>Write as little markup and as few style definitions as possible.</h5><p>Small file size and shallow markup heirarchy make the site faster to load and easier to maintain. To that end, we write as little markup and as few style as possible to make the page appear and function as necessary. In practice, this means things like using <code>padding</code> and <code>margin</code> to create space between elements instead of using <code>br</code> or empty <code>p</code> tags, and writing reusable CSS classes that add common traits (eg <code>background-color</code>) and can be used in conjunction with other reusable CSS classes that provide other common traits (eg <code>font-size</code>).</p><h2>Rules</h2><p>We have a few easy-to-follow rules for HTML and CSS development that have evolved from years of experience.</p><h5>Rules for writing HTML</h5><ul
class="default_list"><li>Block-level elements      are  never be self-closing, even      when empty.<br
/> <code>&lt;div /&gt;</code> should always be written as <code>&lt;div&gt;&lt;/div&gt;</code>, but but <code>&lt;img /&gt;</code> or <code>&lt;span /&gt;</code> is proper.</li><li>Markup always validates      unless there is a very good reason (eg for cross-browser support or CMS      limitations).<br
/> There are many validators but W3C’s is preferred: <a
href="http://validator.w3.org/">http://validator.w3.org/</a></li><li>Documents are written for      HTML 5.<br
/> Documents should use the the <code>&lt;!DOCTYPE html&gt;</code> declaration.</li><li>Tables are used only for      tabular data, not for layout.</li><li>Stylesheets are included      in the <code>&lt;head&gt;</code> of the page.</li><li>Stylesheets are included      using <code>&lt;link /&gt;</code> tags, not <code>@import</code> statements.<br
/> It is permissable, however, to use <code>@import</code> statements within an external stylesheet.</li><li>Markup should be indented      using tabs, not spaces, so that the indentation matches the markup      heirarchy.</li><li>CSS and JavaScript are      included in external files, not written inline in the page.</li><li>External JavaScript files      are included at the bottom of the page just before the <code>&lt;/body&gt;</code>.</li></ul><h5>Rules for writing CSS</h5><ul
class="default_list"><li>CSS is written a compact      format characterized by the selector and all definitions on one line.<br
/> Use <a
href="http://www.codebeautifier.com/">http://www.codebeautifier.com/</a> to switch between formats; the format described here is called ‘High’ compression.<br
/> <strong><em>Improper:<br
/> </em></strong></p><pre class="brush: css;">.my-class {
	width: 300px;
	height: 300px;
}</pre><p><strong><em>Proper:</em></strong></p><pre class="brush: css;">.my-class { width: 300px; height: 300px; }</pre></li><li>Selectors use hyphens to      delineate words, not camel case or underscores.<br
/> Improper: <code>.myClass</code> or <code>#my_element</code>.      Proper: <code>.better-class</code></li><li>Hacks to make pages work      correctly in Internet Explorer are included in a separate IE-specific      stylesheet and included on the page using conditional comments.</li><li>During development, sites      use a global stylesheet for universal definitions and separate sheets for      independent areas or features of the site.</li><li>Use of style attributes in markup is avoided.</li><li>When possible (that is,      when specific instances are known), <code>.png</code> transparency should be fixed for      specific elements using the IE-6 specific stylesheet instead of using an <code>.htc</code> file as a behavior.<br
/> <strong><em>Improper:</em></strong></p><pre class="brush: css;">a { behavior: url(iepngfix.htc); }</pre><p><strong><em>Proper:<br
/> </em></strong></p><pre class="brush: css;">a#button { background: none; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,      sizingMethod=crop, src='../images/button.png'); }</pre></li><li>The default font size is      declared in pixels for the <code>&lt;body&gt;</code> and      the declared for other elements as percentages.<pre class="brush: css;">body { font-size: 13px; }
h1 { font-size: 125%; }</pre></li></ul> ]]></content:encoded> <wfw:commentRss>http://joesong.com/2010/02/html-and-css-development-guidelines/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>WestlawNext.com</title><link>http://joesong.com/2010/01/westlawnext-com/</link> <comments>http://joesong.com/2010/01/westlawnext-com/#comments</comments> <pubDate>Sun, 31 Jan 2010 23:00:25 +0000</pubDate> <dc:creator>josephsong</dc:creator> <category><![CDATA[Portfolio]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[OLSON]]></category> <category><![CDATA[programming]]></category><guid
isPermaLink="false">http://joesong.com/?p=683</guid> <description><![CDATA[Product launch site for the biggest name in legal research.]]></description> <content:encoded><![CDATA[<p><a
href="http://joesong.com/wp-content/uploads/2010/02/westlawnext.png"><img
class="alignright size-thumbnail wp-image-686" title="WestlawNext.com" src="http://joesong.com/wp-content/uploads/2010/02/westlawnext-150x150.png" alt="" width="150" height="150" /></a><strong>The Site:</strong> Thomson Reuters, the leading provider of legal and business research products, needed a site to promote the launch of their newest product, WestlawNext.<br
/> <a
href="http://westlawnext.com" target="_blank">http://westlawnext.com</a></p><p><strong>The Client:</strong> Thomson Reuters&#8217; clients are savvy and busy. They knew that if the site was going to reach them, it had to be fast, solid and engaging.</p><p><strong>My Role:</strong> Developer in small, focused group to create the prototype and an on-site advisor during integration with their existing systems.</p><p><strong>The Technology:</strong> The client needed to integrate the site into their CMS but they had asked us to create and test a prototype site before handing it over. We built the original with very limited PHP since we knew TR would be using .NET in the end but PHP allowed our team to quickly build the prototype. The site uses a custom Flash video player and also has a limited but useful mobile version. This mobile version was very important to the client as the majority of their customers regularly use BlackBerrys and other mobile devices. During integration a few technical hurdles appeared from use of their legacy systems but because I was on-site at the time, launch was not affected.</p><p><strong>The Highlights:</strong> <a
href="http://west.thomson.com/westlawnext/seeit/default.aspx" target="_blank">Multiple video players</a> used in conjunction with jQuery UI tabs. Animated main navigation.</p> ]]></content:encoded> <wfw:commentRss>http://joesong.com/2010/01/westlawnext-com/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Avoiding flickering in jQuery when animating elements which contain Flash</title><link>http://joesong.com/2010/01/avoiding-flickering-in-jquery-when-animating-elements-which-contain-flash/</link> <comments>http://joesong.com/2010/01/avoiding-flickering-in-jquery-when-animating-elements-which-contain-flash/#comments</comments> <pubDate>Mon, 18 Jan 2010 21:28:55 +0000</pubDate> <dc:creator>josephsong</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[jQuery]]></category><guid
isPermaLink="false">http://joesong.com/?p=648</guid> <description><![CDATA[jQuery slideToggle or slideDown will cause a Flash movie to flicker if the movie is inside the animated element. A short note on how to fix it.]]></description> <content:encoded><![CDATA[<p>So, we had this issue when were were using slideToggle (and it would apply to slideDown) where the Flash movie contained inside the element we were animating would flicker once the animation is complete.</p><p>What&#8217;s happening: While animating, jQuery needs to add a few style definitions if they are not already declared. Among these is the &#8216;overflow&#8217; property. jQuery sets this to &#8216;hidden&#8217; in order to show the animation and then removes this declaration upon completion of the animation. When the declaration is removed, Flash gets the signal to re-render the movie (because, possibly, the layout of the page has changed).</p><p>How to fix it: declare &#8216;overflow:hidden&#8217; in the CSS for the element. Voilá, the flickering is gone.</p> ]]></content:encoded> <wfw:commentRss>http://joesong.com/2010/01/avoiding-flickering-in-jquery-when-animating-elements-which-contain-flash/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)

Served from: joesong.com @ 2010-07-31 09:40:27 -->