<?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>justaddwater.dk &#187; Web Standards</title>
	<atom:link href="http://justaddwater.dk/category/webstandards/feed/" rel="self" type="application/rss+xml" />
	<link>http://justaddwater.dk</link>
	<description>Instant Usability &#38; Web Standards</description>
	<lastBuildDate>Fri, 24 Feb 2012 16:00:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Get started using advanced web fonts today</title>
		<link>http://justaddwater.dk/2012/02/24/get-started-using-advanced-webfonts-today/</link>
		<comments>http://justaddwater.dk/2012/02/24/get-started-using-advanced-webfonts-today/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 16:00:05 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[webdevelopment]]></category>
		<category><![CDATA[webfonts]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1580</guid>
		<description><![CDATA[I saw this example on a blog today:

<a href="http://justaddwater.dk/2012/02//24/get-started-using-advanced-web-fonts-today"><img class="aligncenter size-full wp-image-1581" title="web-font-example" src="http://justaddwater.dk/wp-content/uploads/2012/02/web-font-example.png" alt="" width="250" height="106" /></a>]]></description>
			<content:encoded><![CDATA[<p>I saw this example on <a href="http://uxcampcph.org/">a blog today</a>:</p>
<p><a href="http://justaddwater.dk/wp-content/uploads/2012/02/web-font-example.png"><img class="aligncenter size-full wp-image-1581" title="web-font-example" src="http://justaddwater.dk/wp-content/uploads/2012/02/web-font-example.png" alt="" width="250" height="106" /></a></p>
<p>Studying the code, it turns out this is just <a href="https://developers.google.com/webfonts/docs/getting_started">clever use of Google&#8217;s font api</a>. What you essentially do is to add this to your &lt;HEAD&gt; element:</p>
<blockquote>
<pre>&lt;!-- Google Fonts --&gt;
&lt;link href='<a href="http://fonts.googleapis.com/css?family=Cabin Sketch:bold">http://fonts.googleapis.com/css?family=Cabin Sketch:bold</a>' rel='stylesheet' type='text/css' /&gt;
&lt;style type="text/css" media="screen"&gt;
  h1 { font-family: 'Cabin Sketch', arial, serif; }
  .entry-title {
    font-family:'Cabin Sketch';
  }
&lt;/style&gt;</pre>
</blockquote>
<p>Now the stylesheet referenced takes care of the rest. It&#8217;s as simple as that!</p>
<h2>Browser support</h2>
<p>The best part of this, is that it works for all modern browsers, and also for old IE versions (down to IE6).</p>
<p>From<a href="https://developers.google.com/webfonts/faq"> googles FAQ</a>:</p>
<blockquote><p><strong>What browsers are supported?</strong></p>
<p>The Google Web Fonts API is compatible with the following browsers:</p>
<ul>
<li>Google Chrome: version 4.249.4+</li>
<li>Mozilla Firefox: version: 3.5+</li>
<li>Apple Safari: version 3.1+</li>
<li>Opera: version 10.5+</li>
<li>Microsoft Internet Explorer: version 6+</li>
</ul>
<p><strong>Does the Google Web Fonts API work on mobile devices?</strong></p>
<p>The Google Web Fonts API works reliably on the vast majority of modern mobile operating systems, including Android 2.2+ and iOS 4.2+ (iPhone, iPad, iPod). Support for earlier iOS versions is limited.</p></blockquote>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>Bandwidth considerations</h2>
<p>One word of caution: Think twice before adding a lot of extra bytes to your web application. You should only add assets to it if it <em>really makes a difference for your end users!</em></p>
<p>&nbsp;</p>
<blockquote>
<pre></pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2012/02/24/get-started-using-advanced-webfonts-today/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Why WebStandards Matter</title>
		<link>http://justaddwater.dk/2010/03/12/1291/</link>
		<comments>http://justaddwater.dk/2010/03/12/1291/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 10:20:55 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[business case]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1291</guid>
		<description><![CDATA[I just revisited &#8220;Why Web Standards Matter (Case Study)&#8221;, that I wrote on the background of a customer problem back in 2006. The points are actually relevant event with the more recent and faster browser versions that we have today. I did a small change to express my opinion better. Changed &#8220;JavaScript should generally be [...]]]></description>
			<content:encoded><![CDATA[<p>I just revisited &#8220;Why Web Standards Matter (Case Study)&#8221;, that I wrote on the background of a customer problem back in 2006. The points are actually relevant event with the more recent and faster browser versions that we have today.</p>
<p>I did a small change to express my opinion better. Changed &#8220;JavaScript should generally be avoided&#8221; to &#8220;Don&#8217;t use JavaScript for general page layout rendering&#8221;.</p>
<p>Here is the modified advice from the article:</p>
<blockquote cite="http://justaddwater.dk/2006/06/29/webstandards-case-study/">
<h3>Long-term findings</h3>
<ul>
<li>Don&#8217;t use JavaScript for general page layout rendering. Think really really hard if it can be done without JavaScript. One example: Print should be done with CSS</li>
<li>If there is no way around it, use standard JavaScript libraries were browser bugs, etc are hidden for the programmer</li>
<li>Tables used for layout are evil. Use tables for table-based content ONLY</li>
<li>HTML code is really messy and hard to maintain. Should be cleaned up to avoid similar situations in the future. Clean up nested tables, table cells with transparent gifs. Use CSS where appropriate could shave up to 50-70% of HTML footprint</li>
<li>Many HTML validation errors. Code improperly nested, forgotten end-tags: Ideally, the pages should have no validation errors. It&#8217;s an achievable work worth the effort and very educational way of working with the code</li>
</ul>
<h3>Long-term benefits</h3>
<p>In general, several benefits could be gained by raising the knowledge of HTML, CSS, Javascript, web standards, and browser issues.</p>
<ul>
<li>Include easier maintenance</li>
<li>Lower risk of change</li>
<li>Lower risk of browser incompatibilities</li>
<li>Lower risk of browser crashes</li>
</ul>
</blockquote>
<p>Read article: <a title="Permanent Link: Why Web Standards Matter (Case  Study)" rel="bookmark" href="http://justaddwater.dk/2006/06/29/webstandards-case-study/">Why Web Standards Matter (Case Study)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2010/03/12/1291/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Script identifying CSS shorthand possibilities</title>
		<link>http://justaddwater.dk/2009/10/21/script-identifying-css-shorthand-possibilities/</link>
		<comments>http://justaddwater.dk/2009/10/21/script-identifying-css-shorthand-possibilities/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 12:29:17 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1211</guid>
		<description><![CDATA[For my own convenience I created this script to identify css files where colors like #aaaaaa can be rewritten in the short form #aaa (saves bandwith, but can also make it easier to identify similar colors) grep -nE '#([0-9a-f])\1([0-9a-f])\2([0-9a-f])\3' **/*.css output from a random project: css/actions.css:19: color: #000000; css/actions.css:38: color: #000000 !important; css/actions.css:53: color: #ffffff [...]]]></description>
			<content:encoded><![CDATA[<p>For my own convenience I created this script to identify css files where colors like #aaaaaa can be rewritten in the short form #aaa</p>
<p>(saves bandwith, but can also make it easier to identify similar colors)</p>
<pre>
<div class="codesnip-container" >grep -nE '#([0-9a-f])\1([0-9a-f])\2([0-9a-f])\3' **/*.css</div>
</pre>
<p>output from a random project:</p>
<pre>
<div class="codesnip-container" >css/actions.css:19:  color: #000000;
css/actions.css:38:  color: #000000 !important;
css/actions.css:53:  color: #ffffff !important;
css/admin.css:90:	color: #cccccc;
css/admin.css:94:	color: #aaaaaa !important;</div>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/10/21/script-identifying-css-shorthand-possibilities/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Print CSS Background Logo Hack</title>
		<link>http://justaddwater.dk/2009/09/29/print-css-background-logo-hack/</link>
		<comments>http://justaddwater.dk/2009/09/29/print-css-background-logo-hack/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 09:08:58 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[webdevelopment]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/2009/09/29/print-css-background-logo-hack/</guid>
		<description><![CDATA[I learned this nice little hack to bypass the standard browser setting that normally prevents background images from being printed. The hack makes use of converting the background-image to a list item with an image. /* Hack, to trick the browser to print another logo Unfortunetaly, Firefox on Windows doesn't show logo on print — [...]]]></description>
			<content:encoded><![CDATA[<p>I learned this nice little hack to bypass the standard browser setting that normally prevents background images from being printed. </p>
<p>The hack makes use of converting the background-image to a list item with an image. </p>
<pre>
<div class="codesnip-container" >/* Hack, to trick the browser to print another logo
   Unfortunetaly, Firefox on Windows doesn't show logo on print
    — see Mozilla bug 133490 for further details */
#header {
  display: list-item;
  list-style-image: url(../images/logo_print.gif);
  list-style-position: inside;
	margin: 0 !important;
  padding: 0 !important;
	height: 50pt;
}</div>
</pre>
<p>This way, you don&#8217;t have to fall back to inserting an image tag in your HTML for the logo. Instead, just have an a element that contains the corporate logo text, and nothing all.</p>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/09/29/print-css-background-logo-hack/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>CSS Styling Buttons Problem with Underlined Text</title>
		<link>http://justaddwater.dk/2009/09/16/css-styling-buttons-problem-with-underlined-text/</link>
		<comments>http://justaddwater.dk/2009/09/16/css-styling-buttons-problem-with-underlined-text/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 08:32:56 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[input]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1141</guid>
		<description><![CDATA[I ran into the challenge the other day to style a&#60;button&#62; element to make it look like a link (with underline and everything). Unfortunately, the &#60;button&#62; element does not react to text-decoration: underline; But according to a discussion at the CSS Creator forum, there is a way out: I was just messing around with it [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into the challenge the other day to style a&lt;button&gt; element to make it look like a link (with underline and everything).</p>
<p>Unfortunately, the &lt;button&gt; element does not react to text-decoration: underline;</p>
<p>But according to <a title="CSS Forum: [Solved?] Doctype prevents underline in button input" href="http://csscreator.com/node/25902">a discussion at the CSS Creator forum</a>, there is a way out:</p>
<blockquote cite="http://csscreator.com/node/25902"><p>I was just messing around with it and for some reason this doesn&#8217;t work:</p>
<div class="codesnip-container" >input {text-decoration:underline;}</div>
<p>but this does:</p>
<div class="codesnip-container" >input {text-decoration:underline;float:left;}</div>
<p>and</p>
<div class="codesnip-container" >input{text-decoration:underline;display:block;}</div>
<p>and</p>
<div class="codesnip-container" >input{text-decoration:underline;position:absolute;}</div>
<p>Don&#8217;t ask me&#8230;  I can&#8217;t explain this one.</p></blockquote>
<p>Interesting!</p>
<p>I ended up implementing it as
<div class="codesnip-container" >display:inline-block;</div>
<p> which also works fine. Here is my final rules for styling buttons as links</p>
<blockquote>
<pre>.clickable, button.tertiary, input.tertiary{
  color: #339;
  text-decoration: underline;
  display: inline-block; /* else underline won't work */
  cursor: pointer;
  border: none;
  background-color: transparent;
  font-size: 1em;
  padding: 0;
}
.clickable:hover, button.tertiary:hover, input.tertiary:hover{
  text-decoration: underline;
  color: #669;
}</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/09/16/css-styling-buttons-problem-with-underlined-text/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>2 Must-Know HTML Table Colum Features Any Webdeveloper Should Be Aware Of</title>
		<link>http://justaddwater.dk/2009/09/02/2-must-know-html-table-colum-features-any-webdeveloper-should-be-aware-of/</link>
		<comments>http://justaddwater.dk/2009/09/02/2-must-know-html-table-colum-features-any-webdeveloper-should-be-aware-of/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 13:23:49 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[tables]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1135</guid>
		<description><![CDATA[<p>I was reading up on the good old HTML specification and discovered a feature I had always wanted -- and it's already there:
Creating widths of columns that will work like percentages, but will also pay attention to any small, fixed-width columns.</p>

<p>Take a look at HTML's proportional widths and amount alignment features.</p>]]></description>
			<content:encoded><![CDATA[<p>I was reading up on the good old HTML specification and discovered a feature I had always wanted &#8212; and it&#8217;s already there:<br />
Creating widths of columns that will work like percentages, but will also pay attention to any small, fixed-width columns.</p>
<p>Take a look at HTML&#8217;s proportional widths and amount alignment features.</p>
<p>Look at this from HTML specification of &lt;COL&gt; elements:</p>
<blockquote><p>Authors may specify column widths in three ways:</p>
<dl>
<dt><strong>Fixed</strong></dt>
<dd>A fixed width specification is given in pixels (e.g., <samp> width</samp>=&#8221;30&#8243;). A fixed-width specification enables incremental rendering.</dd>
<dt><strong>Percentage</strong></dt>
<dd>A percentage specification (e.g., <samp>width</samp>=&#8221;20%&#8221;) is based on the percentage of the horizontal space available to the table (between the current left and right margins, including floats). Note that this space does not depend on the table itself, and thus percentage specifications enable incremental rendering.</dd>
<dt><strong>Proportional</strong></dt>
<dd>Proportional specifications (e.g., <samp>width</samp>=&#8221;3*&#8221;) refer to portions of the horizontal space <em>required</em> by a table. If the table width is given a fixed value via the <samp>width</samp> attribute of the <a href="http://www.w3.org/TR/html4/struct/tables.html#edef-TABLE"><samp>TABLE</samp></a> element, user agents may render the table incrementally even with proportional columns.However, if the table does not have a fixed width, user agents must receive all table data before they can determine the horizontal space required by the table. Only then may this space be allotted to proportional columns.</p>
</dd>
</dl>
</blockquote>
<p>Proportional widths! Nice. This means that you can create tables like this example (i have swapped the original HTML4 style to lowercase XHTML):</p>
<blockquote><p>Once the (visual) user agent has received the table&#8217;s data: the available horizontal space will be alloted by the user agent as follows: First the user agent will allot 30 pixels to columns one and two. Then, the minimal space required for the third column will be reserved. <strong>The remaining horizontal space will be divided into six equal portions (since 2* + 1* + 3* = 6 portions)</strong>. Column four (2*) will receive two of these portions, column five (1*) will receive one, and column six (3*) will receive three.</p>
<pre>&lt;table&gt;
&lt;colgroup&gt;
  &lt;col width="30"/&gt;
&lt;colgroup&gt;
  &lt;col width="30"/&gt;
  &lt;col width="0*"/&gt;
  &lt;col width="2*"/&gt;
&lt;colgroup align="center"&gt;
  &lt;col width="1*"/&gt;
  &lt;col width="3*" align="char" char=":"/&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;td&gt; ...
...rows...
&lt;/table&gt;</pre>
</blockquote>
<p>This leaves me with one big question: How is browser support for &lt;col width=&#8221;2*&#8221;&gt; ????</p>
<p>BONUS: Did you notice the little align feature &#8216;align=&#8221;char&#8221; char=&#8221;:&#8221; &#8216; so that you can correctly align your decimal amounts? I was not aware of that either!</p>
<p>More info in W3C&#8217;s HTML4 specification &#8220;<a href="http://www.w3.org/TR/html4/struct/tables.html#h-11.2.4.4">Calculating the widths of columns</a>&#8220;</p>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/09/02/2-must-know-html-table-colum-features-any-webdeveloper-should-be-aware-of/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>HTML Guide Textmate Snippets Open Sourced</title>
		<link>http://justaddwater.dk/2009/02/25/html-guide-textmate-snippets-open-sourced/</link>
		<comments>http://justaddwater.dk/2009/02/25/html-guide-textmate-snippets-open-sourced/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 15:38:02 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[htmlguide]]></category>
		<category><![CDATA[portals]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[virk.dk]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1036</guid>
		<description><![CDATA[One year ago I published &#8220;Design Guide or HTML Markup Guide&#8221; with link to the HTML guide we did for the biggest Danish business internet portal. The HTML guide is a really useful tool for every public authority that must deliver applications for the portal. As a help for my own work back then, I [...]]]></description>
			<content:encoded><![CDATA[<p>One year ago I published &#8220;<a title="Permanent Link: Design Guide or HTML Markup Guide" rel="bookmark" href="../2008/02/08/design-guide-or-html-markup-guide/">Design Guide or HTML Markup Guide</a>&#8221; with link to the HTML guide we did for the biggest Danish business internet portal.</p>
<p>The HTML guide is a really useful tool for every public authority that must deliver applications for the portal.</p>
<p>As a help for my own work back then, I created <a href="http://github.com/jesperronn/virk_dk_htmlsnippets/tree/master">virk_dk_htmlsnippets</a>:</p>
<blockquote>
<h2>Snippets available</h2>
<div class="codesnip-container" >skel</div>
<p>(tab) &#8212; creates HTML skeleton in blank file. Adds correct doctype, head, body and container divs required for the virk.dk html to show correctly.</p>
<div class="codesnip-container" >fieldset</div>
<p>(tab)   Groups of form elements. Use where you would have used ordinary fieldsets.  See HTML guide » <a href="http://xmltools2.oio.dk/virk/htmlguide/form-fieldset.html">Form grupper (fieldsets)</a></p>
<div class="codesnip-container" >button</div>
<p>(tab) &#8212; submit button and other buttons. See HTML guide »  <a href="http://xmltools2.oio.dk/virk/htmlguide/buttons.html">Knapper</a></p>
<div class="codesnip-container" >inputcheck</div>
<p>(tab) &#8212; standard checkbox with label and group</p>
<div class="codesnip-container" >inputtext</div>
<p>(tab) &#8212; text field</p>
<div class="codesnip-container" >select</div>
<p>(tab) &#8212; select element</p>
<div class="codesnip-container" ></div>
<p>Usage examples see HTML guide <a href="http://xmltools2.oio.dk/virk/htmlguide/form-simple.html">Simple form elementer</a>,  <a href="http://xmltools2.oio.dk/virk/htmlguide/form-special.html">Særlige form elementer</a></p>
<div class="codesnip-container" >table</div>
<p>(tab) &#8212; table element. See HTML guide » <a href="http://xmltools2.oio.dk/virk/htmlguide/tables.html">Tabeller</a></p>
<div class="codesnip-container" >td</div>
<p>(tab) &#8212; table cell inside table row.</p>
<div class="codesnip-container" >th</div>
<p>(tab) &#8212; table header cell inside table row.</p></blockquote>
<p>I&#8217;m releasing the snippets as open source under the <a href="http://creativecommons.org/licenses/LGPL/2.1/">LGPL license</a> so you can freely change, and distribute. However, I encourage you to send me the changes and I&#8217;ll work the relevant changes into the snippets.</p>
<p>Any editor that understands <a href="http://macromates.com/">Textmate</a> snippets can be used. <a href="http://e-texteditor.com/">E-texteditor</a> for Windows or <a href="http://projects.gnome.org/gedit/">GEdit</a> for Unix/Linux will read the snippets as well.</p>
<h3>Download snippets</h3>
<p>Go to the project page on GitHub to download <a href="http://github.com/jesperronn/virk_dk_htmlsnippets/tree/master">virk_dk_htmlsnippets</a></p>
<h2>Vision: Standard HTML for portals</h2>
<p>In general, different portals have different HTML markup. Historically, this is because of many constraints: Limitations in the chosen web framework, limitations in chosen graphical design, random naming of css classes, developer laziness, etc.</p>
<p>What if portals could actually use the same HTML markup for most elements? This way, subcontractors and content providers could deliver content/portlets/webparts for multiple portals.</p>
<p>In Denmark there are only a few major public portals: Virk.dk for businesses, and Borger.dk for citizens. But some content would actually be relevant on both portals. Sadly, the HTML markup is very different.</p>
<p>Imagine how the public authorities would benefit from shared HTML markup:</p>
<ul>
<li>Develop only one component with the wanted functionality.</li>
<li>Easier &#8220;mashup&#8221; and reuse of data for presentation on multiple portals</li>
<li>Lower learning curve for developers</li>
<li>More development accelerators like these snippets would emerge</li>
</ul>
<p>Next time I get to do work for that project, I would probably also create a Ruby on Rails form builder that automagically would generate the right HTML.</p>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/02/25/html-guide-textmate-snippets-open-sourced/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS Fun: Flag Deprecated HTML Tags</title>
		<link>http://justaddwater.dk/2009/01/08/css-fun-flag-deprecated-html-tags/</link>
		<comments>http://justaddwater.dk/2009/01/08/css-fun-flag-deprecated-html-tags/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 10:47:14 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[css webdevelopment deprecated html validation]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=990</guid>
		<description><![CDATA[<a href="/2009/01/08/css-fun-flag-d…ated-html-tagscss-fun-flag-deprecated-html-tags/"><img src="http://justaddwater.dk/wp-content/uploads/2009/01/blink-and-flag-deprecated-font-b-i-tags.gif" alt="" title="blink-and-flag-deprecated-font-b-i-tags" width="249" height="165" class="alignnone size-full wp-image-991" /></a>]]></description>
			<content:encoded><![CDATA[<p>Here is a little fun CSS snippet that helped me identify deprecated HTML on a recent project. Put these lines into the CSS file of your website:</p>
<blockquote><div class="codesnip-container" >/* Watch out for invalid/deprecated HTML in CMS */<br />
b{font-size: x-large; background-color: fuchsia; color: yellow; font-weight: normal;}<br />
i{font-size: x-large; background-color: lime; color: blue; font-style: normal}<br />
font{background-color: aqua; color: red}<br />
b,i,font{text-decoration: blink;}</div>
</blockquote>
<p><a href="http://justaddwater.dk/wp-content/uploads/2009/01/blink-and-flag-deprecated-font-b-i-tags.gif"><img src="http://justaddwater.dk/wp-content/uploads/2009/01/blink-and-flag-deprecated-font-b-i-tags.gif" alt="" title="blink-and-flag-deprecated-font-b-i-tags" width="249" height="165" class="alignnone size-full wp-image-991" /></a></p>
<p>This was really useful for identifying dirty HTML that was generated from a Microsoft-based CMS. </p>
<p>Coloring and blinking text makes the editors aware that something is wrong. Two major advantages for this approach:</p>
<ul>
<li>Instant attention on HTML validation errors (also for non-developers)</li>
<li>Developers spend less time on hunting down invalid HTML that constantly sneaks into the web application.</li>
</ul>
<p>These lines may also be useful to you &#8212; unless you are able to guard your HTML before it&#8217;s inserted in your application (something that was not possible at this project).</p>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/01/08/css-fun-flag-deprecated-html-tags/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Introducing Tiny JavaScript Number Formatter</title>
		<link>http://justaddwater.dk/2008/08/18/introducing-tiny-javascript-number-formatter/</link>
		<comments>http://justaddwater.dk/2008/08/18/introducing-tiny-javascript-number-formatter/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 08:50:25 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=945</guid>
		<description><![CDATA[For a current project, I created a tiny number formatter that inserts thousand delimiters in a string: 10000 to 10,000 etc. Just add css class=&#8221;numberformat currency&#8221; to a text field, and it will be formatted automatically. It is based on the Prototype JavaScript library. You can get it from it&#8217;s GitHub repository page. Feel free [...]]]></description>
			<content:encoded><![CDATA[<p>For a current project, I created a tiny number formatter that inserts thousand delimiters in a string:</p>
<p>10000 to 10,000 etc.</p>
<p>Just add css class=&#8221;numberformat currency&#8221; to a text field, and it will be formatted automatically.</p>
<p>It is based on the <a href="http://prototypejs.org">Prototype JavaScript library</a>. You can get it from it&#8217;s GitHub repository page. Feel free to add or alter the functionality. Releasing under Creative Commons license. </p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 Unported License</a>.</p>
<p>Some quick notes:</p>
<p>I&#8217;m using this on a rather big HTML page, so the selection of DOM nodes must be as simple and quick as possible. So if you are considering moderations, please make sure that the DOM manipulations are as lightweight as possible.</p>
<p>The script is as simple as possible. It does not parse the string as a number. Instead it just strips any thousand delimiters in the string. Afterwards it sets its own. There may be some important logic here to add to make the code more robust.</p>
<p>I have also added a test page to the project&#8230; not a real test page, but a HTML page that shows examples that are modified. Please back up any added functionality with changes to that page as well.</p>
<p>Contact me for commit access if you would like to contribute. I do not expect to add any functionality to the code unless the work project requires it. </p>
<p>More info:<br />
<a href="http://github.com/jesperronn/numberformat-js/">GitHub repository</a></p>
<p><small>Technorati Tags: <a href="http://technorati.com/tag/javascript" rel="tag">javascript</a>, <a href="http://technorati.com/tag/opensource" rel="tag"> opensource</a>, <a href="http://technorati.com/tag/project" rel="tag"> project</a>, <a href="http://technorati.com/tag/library" rel="tag"> library</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2008/08/18/introducing-tiny-javascript-number-formatter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adding Deprecation Warning in JavaScript Console</title>
		<link>http://justaddwater.dk/2008/07/17/adding-deprecation-warning-in-javascript-console/</link>
		<comments>http://justaddwater.dk/2008/07/17/adding-deprecation-warning-in-javascript-console/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 11:10:49 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=940</guid>
		<description><![CDATA[I used this quick trick today to help me clean up and refactor some javascript functions today: if ("console" in window) console.warn('DEPRECATED function call to '+ arguments.callee +'\nCalled by:\n'+ arguments.callee.caller ); Which results in a fine deprecation warning in the console: There is plenty of space for improvement here. Feel free to use or tamper [...]]]></description>
			<content:encoded><![CDATA[<p>I used this quick trick today to help me clean up and refactor some javascript functions today:</p>
<pre>
<div class="codesnip-container" >if ("console" in window)
  console.warn('DEPRECATED function call to '+ arguments.callee
  +'\nCalled by:\n'+ arguments.callee.caller );</div>
</pre>
<p>Which results in a fine deprecation warning in the console:<br />
<a href='http://justaddwater.dk/wp-content/uploads/2008/07/firebug-javascript-caller-callee-debugger-warning.png'><img src="http://justaddwater.dk/wp-content/uploads/2008/07/firebug-javascript-caller-callee-debugger-warning.png" alt="" title="firebug-javascript-caller-callee-debugger-warning" width="500" height="249" class="alignnone size-full wp-image-941" /></a></p>
<p>There is plenty of space for improvement here. Feel free to use or tamper &#8230; but please post any alternative suggestions here as a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2008/07/17/adding-deprecation-warning-in-javascript-console/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

