<?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>GirlieMac! Blog</title>
	<atom:link href="http://girliemac.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://girliemac.com/blog</link>
	<description>Web and Mobile Development</description>
	<lastBuildDate>Tue, 27 Dec 2011 22:05:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Quick Fun: CSS3 Filter Effects</title>
		<link>http://girliemac.com/blog/2011/12/21/quick-fun-css3-filter-effects/</link>
		<comments>http://girliemac.com/blog/2011/12/21/quick-fun-css3-filter-effects/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 23:30:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Sandbox]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=411</guid>
		<description><![CDATA[I quickly played with the brand-new CSS Filter Effects on the latest WebKit Nightly! (Edited: and Chrome Canary 18.0.976.0 +) Click the images to view in the [...]]]></description>
			<content:encoded><![CDATA[
<p>I quickly played with the brand-new <a href="https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html" target="_blank">CSS Filter Effects</a> on the latest <a href="http://nightly.webkit.org" target="_blank">WebKit Nightly</a>! (Edited: and <a href="http://tools.google.com/dlpage/chromesxs" target="_blank">Chrome Canary</a> 18.0.976.0 +)</p>
<p>Click the images to view in the full size.</p>
<p><a href="http://girliemac.com/blog/wp-content/uploads/2011/12/default.png"><img src="http://girliemac.com/blog/wp-content/uploads/2011/12/default-300x235.png" alt="no filter" title="no filter" width="300" height="235" class="alignleft size-medium wp-image-412" /></a><br />
This is a default google.com screen.<br />
No filter added.<br />
<br clear="all" /></p>
<p><a href="http://girliemac.com/blog/wp-content/uploads/2011/12/blur-2px.png"><img src="http://girliemac.com/blog/wp-content/uploads/2011/12/blur-2px-300x235.png" alt="filter:blur(2px)" title="filter:blur(2px)" width="300" height="235" class="alignleft size-medium wp-image-413" /></a><br />
<strong>blur(radius)</strong> to create Gaussian blur</p>
<pre class="css">
-webkit-filter: blur(2px);
</pre>
<p>The default is 0, no blur.<br />
<br clear="all" /></p>
<p><a href="http://girliemac.com/blog/wp-content/uploads/2011/12/brightness-30.png"><img src="http://girliemac.com/blog/wp-content/uploads/2011/12/brightness-30-300x235.png" alt="filter:brightness(30%)" title="filter:brightness(30%)" width="300" height="235" class="alignleft size-medium wp-image-416" /></a><br />
<strong>brightness(amount)</strong></p>
<pre class="css">
-webkit-filter: brightness(30%);
</pre>
<p>The default is 100%. Values of amount over 100% are allowed.<br />
<br clear="all" /></p>
<p><a href="http://girliemac.com/blog/wp-content/uploads/2011/12/contrast-30.png"><img src="http://girliemac.com/blog/wp-content/uploads/2011/12/contrast-30-300x235.png" alt="filter:contrast(30%)" title="filter:contrast(30%)" width="300" height="235" class="alignleft size-medium wp-image-418" /></a><br />
<strong>contrast(amount)</strong></p>
<pre class="css">
-webkit-filter: contrast(30%);
</pre>
<p>The default is 100%. Values of amount over 100% are allowed.<br />
<br clear="all" /></p>
<p><a href="http://girliemac.com/blog/wp-content/uploads/2011/12/grayscale-100.png"><img src="http://girliemac.com/blog/wp-content/uploads/2011/12/grayscale-100-300x235.png" alt="filter:grayscale(100%)" title="filter:grayscale(100%)" width="300" height="235" class="alignleft size-medium wp-image-419" /></a><br />
<strong>grayscale(amount)</strong></p>
<pre class="css">
-webkit-filter: grayscale();
</pre>
<p>The default is 100%.<br />
<br clear="all" /></p>
<p><a href="http://girliemac.com/blog/wp-content/uploads/2011/12/sepia-100.png"><img src="http://girliemac.com/blog/wp-content/uploads/2011/12/sepia-100-300x235.png" alt="filter:sepia(100%)" title="filter:sepia(100%)" width="300" height="235" class="alignleft size-medium wp-image-420" /></a><br />
<strong>sepia(amount)</strong></p>
<pre class="css">
-webkit-filter: sepia();
</pre>
<p>The default is 100%.<br />
<br clear="all" /></p>
<p><a href="http://girliemac.com/blog/wp-content/uploads/2011/12/invert-100.png"><img src="http://girliemac.com/blog/wp-content/uploads/2011/12/invert-100-300x235.png" alt="filter:invert(100%)" title="filter:invert(100%)" width="300" height="235" class="alignleft size-medium wp-image-421" /></a><br />
<strong>invert(amount)</strong></p>
<pre class="css">
-webkit-filter: invert();
</pre>
<p>The default is 100%.<br />
<br clear="all" /></p>
<p><a href="http://girliemac.com/blog/wp-content/uploads/2011/12/opacity-30.png"><img src="http://girliemac.com/blog/wp-content/uploads/2011/12/opacity-30-300x235.png" alt="filter:opacity(30%)" title="filter:opacity(30%)" width="300" height="235" class="alignleft size-medium wp-image-422" /></a><br />
<strong>opacity(amount)</strong></p>
<pre class="css">
-webkit-filter: opacity(30%);
</pre>
<p>The default is 100%, no transparency.<br />
<br clear="all" /></p>
<p><a href="http://girliemac.com/blog/wp-content/uploads/2011/12/saturate-50.png"><img src="http://girliemac.com/blog/wp-content/uploads/2011/12/saturate-50-300x235.png" alt="filter:saturate(50%)" title="filter:saturate(50%)" width="300" height="235" class="alignleft size-medium wp-image-423" /></a><br />
<strong>Saturate(amount)</strong></p>
<pre class="css">
-webkit-filter: saturate(50%);
</pre>
<p>The default is 100%.<br />
<br clear="all" /></p>
<p><a href="http://girliemac.com/blog/wp-content/uploads/2011/12/saturate-300.png"><img src="http://girliemac.com/blog/wp-content/uploads/2011/12/saturate-300-300x235.png" alt="filter:saturate(300%)" title="filter:saturate(300%)" width="300" height="235" class="alignleft size-medium wp-image-436" /></a><br />
<strong>Saturate(amount)</strong> &#8211; the amount over 100% is also allowed.</p>
<pre class="css">
-webkit-filter: saturate(300%);
</pre>
<p><br clear="all" /></p>
<p><a href="http://girliemac.com/blog/wp-content/uploads/2011/12/hue-rorate-90deg.png"><img src="http://girliemac.com/blog/wp-content/uploads/2011/12/hue-rorate-90deg-300x235.png" alt="filter:hue-rotate(90deg)" title="filter:hue-rotate(90deg)" width="300" height="235" class="alignleft size-medium wp-image-424" /></a><br />
<strong>hue-rotate(angle)</strong></p>
<pre class="css">
-webkit-filter: hue-rotate(90deg);
</pre>
<p>The default is 0deg.<br />
<br clear="all" /></p>
<p><a href="http://girliemac.com/blog/wp-content/uploads/2011/12/hue-rorate-300deg.png"><img src="http://girliemac.com/blog/wp-content/uploads/2011/12/hue-rorate-300deg-300x235.png" alt="filter:hue-rotate(300deg)" title="filter:hue-rotate(300deg)" width="300" height="235" class="alignleft size-medium wp-image-425" /></a><br />
<strong>hue-rotate(angle)</strong></p>
<pre class="css">
-webkit-filter: hue-rotate(300deg);
</pre>
<p><br clear="all" /></p>
<p><a href="http://girliemac.com/blog/wp-content/uploads/2011/12/drop-shadown-on-toolbar.png"><img src="http://girliemac.com/blog/wp-content/uploads/2011/12/drop-shadown-on-toolbar-300x235.png" alt="filter:drop-shadow(...)" title="filter:drop-shadow(...)" width="300" height="235" class="alignleft size-medium wp-image-441" /></a><br />
<strong>drop-shadow(&lt;shadow&gt;)</strong></p>
<pre class="css">
/* Adding Drop-shadow on the toolbar at the top */

#bg {
  -webkit-filter: drop-shadow(rgba(0,0,0,0.5) 0 5px 5px);
}
</pre>
<p><br clear="all" /></p>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2011/12/21/quick-fun-css3-filter-effects/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>The Day I seized The InterWeb &#8211; HTTP Status Cats</title>
		<link>http://girliemac.com/blog/2011/12/18/the-day-i-seized-the-interweb-http-status-cats/</link>
		<comments>http://girliemac.com/blog/2011/12/18/the-day-i-seized-the-interweb-http-status-cats/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 07:16:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GirlieMac! News]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=385</guid>
		<description><![CDATA[I thought my biggest achievement of 2011 was the (un)successful launch of HP TouchPad, and the European tour to advocate the webOS development&#8230; but I should nominate [...]]]></description>
			<content:encoded><![CDATA[
<p style="margin-bottom:1em"><img src="http://girliemac.com/blog/wp-content/uploads/2011/12/Tech-Tumblr-Technology-News-HTTP-Status-Cats-CNNMoney1.png" alt="news on cnn" title="HTTP Status Cats - CNNMoney" width="560"  />
</p>
<p>I thought my biggest achievement of 2011 was the (un)successful launch of HP TouchPad, and the European tour to advocate the webOS development&#8230; but I should nominate the <strong>seizing the InterWeb</strong> before the government does (<em>SOPA</em>), for my greatest achievement of the year.</p>
<p>I got the certified cat geek lady status on the InterWeb, after my <a href="http://www.flickr.com/photos/girliemac/sets/72157628409467125/detail/" title="Flickr Set" target="_blank">HTTP Status Cats</a> went viral on Dec. 13th.</p>
<p>Within 24 hours I posted the pictures on my Flickr page and tweeted, it has spread all over the InterWeb, and now the status kittehs are officially an Internet <a href="http://knowyourmeme.com/memes/subcultures/cats#httpstatus" title="Know Your Meme" target="_blank">meme</a>.</p>
<p>What the meme does? It results the secondary and ternary awesome creations-<br />
What made my day was Rogério Vicente has create the <a href="http://www.reddit.com/r/programming/comments/nce1m/http_status_cats_api/">API</a> with the cats.<br />
And Heroku actually made it <a href="http://httpcats.herokuapp.com/">available</a>. (This was made #2 spot on <a href="http://news.ycombinator.com/item?id=3352698">Hacker News</a> on Dec.14th).<br />
This is awesome. I love when fellow geeks make things into the higher level.</p>
<p>In case you have not seen the HTTP Status Cats:<br />
See my Flickr set at <a href="http://www.flickr.com/photos/girliemac/sets/72157628409467125/detail/" target="_blank">http://www.flickr.com/photos/girliemac/sets/72157628409467125/detail/</a><br />
I will post the missing status soon.</p>
<h2>More Links</h2>
<p>The HTTP Status Cats is featured on:<br />
BoingBoing – <a href="http://boingboing.net/2011/12/14/http-status-cats-by-girliemac.html" target="_blank">HTTP status cats by GirlieMac: classic server error codes, now with cats</a><br />
LaughingSquid – <a href="http://laughingsquid.com/http-status-cats-http-status-codes-displayed-using-cat-photos/" target="_blank">HTTP Status Cats, HTTP Status Codes Displayed Using Cat Photos</a><br />
Neatorama – <a href="http://www.neatorama.com/2011/12/14/http-status-codes-illustrated-by-cats/" target="_blank">HTTP Status Codes Illustrated by Cats</a><br />
CNN Money Tech – <a href="http://cnnmoneytech.tumblr.com/post/14275966460/http-status-cats" target="_blank">HTTP Status Cats</a><br />
Mashable &#8211; <a href="http://mashable.com/2011/12/17/http-status-cats/" target="_blank">HTTP Status Cats: Hilarious Motivational Posters [PICS]</a><br />
I Can Has Cheezburger? &#8211; <a href="http://icanhascheezburger.com/2011/12/15/funny-pictures-http-status-cats/" target="_blank">HTTP Status Cats</a></p>
<p>Translated to Japanese media:<br />
らばQ &#8211; <a href="http://labaq.com/archives/51719376.html" target="_blank">なんてわかりやすい…猫で覚えるネットのあの表示</a><br />
Idea*Idea &#8211; <a href="http://www.ideaxidea.com/archives/2011/12/http_status_code_by_cat.html" target="_blank">HTTPステータスコードを猫で表現してみた</a></p>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2011/12/18/the-day-i-seized-the-interweb-http-status-cats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Form Field Validation with CSS3</title>
		<link>http://girliemac.com/blog/2011/11/28/html5-form-field-validation-with-css3/</link>
		<comments>http://girliemac.com/blog/2011/11/28/html5-form-field-validation-with-css3/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 08:59:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[UI/UX]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=364</guid>
		<description><![CDATA[HTML5 Built-in Form Validation HTML5 specifications come with a full of goodness that make web devs&#8217; lives easier. The one of the goodies, the client form validation [...]]]></description>
			<content:encoded><![CDATA[
<h2>HTML5 Built-in Form Validation</h2>
<p>HTML5 specifications come with a full of goodness that make web devs&#8217; lives easier.<br />
The one of the goodies, the client form validation is the one I like a lot, because, for example, by adding <code>required</code> attribute to an <code>input</code>, I don&#8217;t need to write any additional JavaScript to warn a user, when the user submits a form without filling out the required fields. The interactive warning UI comes with browsers.</p>
<p><img src="http://girliemac.com/blog/wp-content/uploads/2011/11/form-validation-required.png" alt="screenshot" title="form-validation-required" width="400" height="120" /></p>
<p>The &#8220;Speech bubble&#8221; UI is built in with HTML5-enabled browsers. (This screenshot is taken on Chrome. Other browsers like Firefox and Opera have their own interface.)</p>
<h3>Pattern Matching</h3>
<p>You can also validate against patterns that defined by you. The <code>pattern</code> attribute specifies a regular expression against the control&#8217;s value.</p>
<pre class="html">
&lt;input type="text" pattern="[0-9]{13,16}" title="A credit card number" /&gt;
</pre>
<p>A user is required to enter values to match a regular expression pattern, in this case, a 13 to 16 digit number. </p>
<h2>CSS3 User Interface Selectors</h2>
<p>There are numerous <em>user interface state pseudo-classes</em>. You&#8217;ve probably already known <code>:hover</code>, <code>:active</code> etc. According to this <a href="http://www.w3.org/TR/css3-ui/#user-interface" target="_blank">W3C Candidate Doc</a>, there are additional pseudo-classes defined, such as <code>:valid</code>, <code>invalid</code>, <code>in-range</code>, <code>out-of-range</code>, <code>required</code>, <code>optional</code>, <code>read-only</code> and <code>read-write</code>.</p>
<p>So I played a bit with <code>:valid</code> and <code>:invalid</code> to check against the regular expression pattern.</p>
<p><img src="http://girliemac.com/blog/wp-content/uploads/2011/11/form-validation.png" alt="Form validation screenshot" title="form-validation" width="401" height="313" /></p>
<p>The diagram shows: 1) The entry is displayed in red when the entered text is not matched.<br />
2) The built-in HTML5 message is displayed when the user submits the form while leaving the invalid entry. No additional CSS is used.<br />
3) The entry is in green when it matches with the defined pattern. Also, a check mark is used as an indicator to tell it is valid.</p>
<p>The simplified code is below. Also you can view the entire code and the working demo on <a href="http://jsfiddle.net/girlie_mac/rdkmY/" target="_blank">jsFiddle</a>.</p>
<pre class="html">
&lt;input id="cc" type="text" pattern="[0-9]{13,16}" required /&gt;
&lt;div class="input-validation"&gt;&lt;/div&gt;
&lt;input id="payButton" type="submit" value="Pay Now" /&gt;
</pre>
<pre class="css">
input[type="text"]:valid {
    color: green;
}

input[type="text"]:valid ~ .input-validation::before {
    content: "✓";
    color: green;
}

input[type="text"]:invalid {
    color: red;
}
</pre>
<p>I was too lazy to create an image, so I just used the unicode checkmark. Actually, what I wanted to do was that inserting the unicode content after the input with this CSS- <code>input:valid:after</code>. However, it is not possible to add contents to the input with the CSS since <code>input</code> has no document tree content. Therefore, I used the extra <code>div</code> after the input. (So I am using the sibling selector, <code>~</code>, to specify the div).</p>
<p>If you would make it prettier, I suggest you should place some icons as a background-image of the input, instead of just dumping some unicode char!</p>
<pre class="css">
input[type="text"]:valid {
    background: url(thumb-up.png) no-repeat top right;
}
</pre>
<h2>References</h2>
<p><a href="http://blog.mozilla.com/webdev/2011/03/14/html5-form-validation-on-sumo/" target="_blank">HTML5 Form Validation on SUMO</a> (Mozilla Blog)</p>
<p><a href="http://www.w3.org/TR/css3-ui/#pseudo-validity" target="_blank">CSS3 Basic User Interface Module</a> by W3C</p>
<p><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#the-pattern-attribute" target="_blank">The pattern attribute</a> by WHATWG </p>
<p><a href="http://html5pattern.com" target="_blank">HTML5 Patterns</a></p>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2011/11/28/html5-form-field-validation-with-css3/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>HTML5 Input Event Handlers and User-Experience</title>
		<link>http://girliemac.com/blog/2011/11/27/html5-input-events/</link>
		<comments>http://girliemac.com/blog/2011/11/27/html5-input-events/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 08:00:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[UI/UX]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=330</guid>
		<description><![CDATA[TL;DR Summary: Use oninput event handler (or input event handler event type) when you register an event to the HTML5 input[type="number"], instead of onchange, onkeyup/down (although you [...]]]></description>
			<content:encoded><![CDATA[
<h2>TL;DR</h2>
<p>Summary: Use <code>oninput</code> event handler (or <code>input</code> event handler event type) when you register an event to the HTML5 input[type="number"], instead of <code>onchange</code>, <code>onkeyup/down</code> (although you may want to include them as the fall-back).</p>
<h2>The Whole Story</h2>
<p>When I participated to compete for <a href="http://nodeknockout.com/" target="_blank">Node.js Knock-out</a> in the end of the summer, I have learned one thing (besides all the node.js coolness) in a bitter way, from the comments by judges: &#8220;the app UI is confusing.&#8221;<br />
Actually, I believed that the app user-interface overall was intuitive enough, however, the one mistake I made with an HTML5 form killed the user-experience &#8211; I used a wrong event handler, something that doesn&#8217;t trigger when it needed to&#8230; </p>
<p>So here, I explain what I didn&#8217;t know; the newly introduced event handlers for HTML5.</p>
<p><img src="http://girliemac.com/blog/wp-content/uploads/2011/11/input-number.png" alt="input type=number" title="input-number" width="221" height="117" /></p>
<p>The screenshot above is a number input control, the input element with a type attribute which value is &#8220;number&#8221;. It represents a precise control for setting the element&#8217;s value to a string representing a number.</p>
<p>Simply, you can write this in html like this:</p>
<pre class="html">
&lt;input type="number" placeholder="Pick a number" id="numPeople" /&gt;
</pre>
<p>You can add some more custom attributes like, <code>required</code>, <code>autofocus</code>, <code>pattern</code>, etc, and the number-specific attributes, <code>min</code>, <code>max</code>, and <code>step</code>. If you are not familiar with the html5 form input attributes, I recommend you should read <a href="http://dev.opera.com/articles/view/new-form-features-in-html5/" target="_blank">New form features in HTML5</a> by Dev Opera.</p>
<p>So what I wanted to do in the particular app was that populating new fields as the user chooses a number. The simple user-flow is:<br/><br />
1. &#8220;How many people would you like to add?&#8221; &#8211; e.g. a user picks 5<br />
2. n-number of new fileds are populated &#8211; e.g. 5 text fileds are displayed<br />
3. the user fills out the text fields<br />
4. the user submit the form
</p>
<p><img src="http://girliemac.com/blog/wp-content/uploads/2011/11/input-number2.png" alt="screenshot" title="input-number2" width="340" height="300" class="alignnone size-full wp-image-338" /></p>
<p>To make the flow #1 and #2 work, what I did was that I registered an event listener to the number input element, and used an event type to listen for.<br />
OK, so which event type? &#8211; Well, I initially thought of <code>change</code>, however, it requires the user to unfocus (blur) the field once, to get the event captured. So, I decided to use <code>keyup</code> so as soon as the user finish typing a number, the event is fired and the function to display the extra fields is called.</p>
<p>OK, it sounds fine &#8211; well, only as long as the user only enter the number manually! </p>
<p>Remember, the HTML5 input field <code>type="number"</code> has the special user-interface, <em>a spinner control</em>, which allows a user to increment and decrement its value. And here is the problem &#8211; the <em>keyup</em> event does <em>not</em> get triggered when the spinner up/down arrow is clicked, at least on Chrome (which the judges were using)! So when some judges tried the app for the first time without much knowing what it does, and picked a number with the spinner control, nothing happened. The app&#8217;s UX was killed right there!</p>
<p>So, really, which event did I need to use? </p>
<p>The answer is <code>input</code>. I did not know about the newly introduced HTML5 <code>oninput</code> event handler until I found <a href="http://whattheheadsaid.com/2010/09/effectively-detecting-user-input-in-javascript" target="_blank"/>this article</a>.</p>
<p>Now, the action is triggered when a user manually type a number, or when the user increment/decrement with the up/down spinner!</p>
<pre class="js">
var numPeople = document.getElementById("numPeople");

numPeople.addEventListener("input", function(e) {
    var num = numPeople.value;
    ...
}, false);
</pre>
<p>Please see the entire <a href="http://jsfiddle.net/girlie_mac/CcqU7/" target=_blank">code snippet and working demo</a>!</p>
<p>Also, I made <a href="http://jsfiddle.net/girlie_mac/5Assc/" target=_blank">another small demo here</a> so you can see when the <code>input</code>, <code>keuyp</code>, and <code>change</code> are captured.</p>
<h2>onsearch Event</h2>
<p>Additionally, there is another HTML5 event that you probably want to know &#8211; the <code>search</code>. The action is invoked when a user hits the enter key or clears the query (by clicking the (x) in a search control.<br />
I can&#8217;t find any references in WHATWG or W3C, and apparently, its upport Level is the Apple extension. I tested it work on the latest Chrome, but not on Firefox 9 or Opera 11.5.</p>
<p><img src="http://girliemac.com/blog/wp-content/uploads/2011/11/input-search.png" alt="input[type=search]" title="input-search" width="250" height="115" class="alignnone size-full wp-image-347" /></p>
<pre class="html">
&lt;input type="search" name="username" placeholder="Enter a Twitter username..." results="5" id="search" /&gt;
</pre>
<pre class="js">
var s = document.getElementById("search");
s.addEventListener("search", function(e) {
    var q = s.value;
    showTweets(q);
}, false);
...
</pre>
<p>The <a href="http://jsfiddle.net/girlie_mac/sfxYG/" target=_blank">code snippet and demo</a> is at jsFiddle, too!</p>
<h2>References</h2>
<p><a href="http://www.whatwg.org/specs/web-forms/current-work/" target=_blank">whatwg.org &#8211; Web Forms 2.0</a><br />
<a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#handler-oninput" target=_blank">whatwg.org &#8211; oninput Event Handler</a><br />
<a href="http://whattheheadsaid.com/2010/09/effectively-detecting-user-input-in-javascript" target=_blank">Effectively detecting user input in JavaScript</a><br />
<a href="http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariHTMLRef/Articles/Attributes.html#//apple_ref/html/attribute/onsearc" target=_blank">Safari HTML Reference (onsearch)</a></p>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2011/11/27/html5-input-events/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating Usable Enyo UI &#8211; Buttons and Interactive Dialogs</title>
		<link>http://girliemac.com/blog/2011/10/26/creating-usable-enyo-ui-buttons-and-interactive-dialogs/</link>
		<comments>http://girliemac.com/blog/2011/10/26/creating-usable-enyo-ui-buttons-and-interactive-dialogs/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 06:55:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[App]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Palm]]></category>
		<category><![CDATA[UI/UX]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=329</guid>
		<description><![CDATA[I wrote this article, Creating Usable UI—Buttons and Interactive Dialogs, for Palm webOS Developer Portal. I walk through the Enyo button setup, the proper use of color [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://developer.palm.com/blog/wp-content/uploads/2011/09/modaldialog.png"/></p>
<p>I wrote this article, <a href="https://developer.palm.com/content/resources/develop/creating_usable_ui_buttons_and_interactive_dialogs.html" target="_blank">Creating Usable UI—Buttons and Interactive Dialogs</a>, for Palm webOS Developer Portal. I walk through the Enyo button setup, the proper use of color and text, and how best to use buttons in intuitive, consistent user dialogs.</p>
<p>This is written for the webOS&#8217;s very own enyo.js framework, however, the major contents should apply to any web and app development so please take a look!</p>
<p>Thanks!</p>
<p>p.s. In case you don&#8217;t know &#8211; I am a developer relations engineer at Palm (acquired by Hewlett-Packard). As you may know, the best-yet-most-unfortunated mobile-platform, webOS&#8217;s future is unknown in this moment&#8230;</p>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2011/10/26/creating-usable-enyo-ui-buttons-and-interactive-dialogs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Thank you, Steve!</title>
		<link>http://girliemac.com/blog/2011/10/06/thank-you-steve/</link>
		<comments>http://girliemac.com/blog/2011/10/06/thank-you-steve/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 19:42:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GirlieMac! News]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=319</guid>
		<description><![CDATA[As a die-hard Apple Fan-girl, I started my very first web site on college web server (@csun.edu domain) in 1996, when people were speculating Apple was going [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://girliemac.com/blog/wp-content/uploads/2011/07/steve-jobs-think-different.jpg" alt="Think Different" title="steve-jobs-think-different" width="520" height="389"  />
</p>
<p>
As a die-hard Apple Fan-girl, I started my very first web site on college web server (@csun.edu domain) in 1996, when people were speculating Apple was going out of business.</p>
<p>At that time, the Mac community was small but very supportive and exciting &#8211; I was particularly involved in the Mac desktop customization email lists, including Japanese ones where I help people with translation.<br />
The Mac-user group in Northridge (maybe it was in Reseda) had a wonderful crowd, and I remember that everybody tried to help me out when my Performa died after installing OS 8.
</p>
<p>When Steve Jobs came back to Apple, we, the community was truly delighted. We all believed that Apple would revive and become bigger than ever.</p>
<p>In 1998, the Bondi-blue iMac debuted with the catch-phrase &#8220;Say Hello to iMac&#8221;. Our mind was truly blown away. Steve totally did think differently!
</p>
<p>After I graduated from college in the year, I moved to Boston and became a environmental microbiology researcher. Around the time, Mac OS X came out and I decided to do more &#8220;pro things&#8221; (LOL) on my Mac &#8211; I started studying computer science. </p>
<p>The funny thing was that a professor at my first comp sci class was also a die-hard Mac fan so I learned I could program in Java on Mac! I still remember his joke about our computer lab, which was entirely donated by Bill Gates, who used to study at the school.</p>
<p>Years past, my web site has been transformed from Mac-fan site to a web tech blog, I decided to keep the name GirlieMac! to show my origin, because without Macs, I would never decided to become a web developer. </p>
<p>&nbsp;</p>
<p>
Thank you, Steve, and good bye.</p>
<div align="right"><img src="http://girliemac.com/blog/wp-content/uploads/2011/10/sad-mac.jpg" alt="sad mac" title="sad-mac" width="157" height="180"  /></div></p>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2011/10/06/thank-you-steve/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Five CSS tricks used in Enyo JS Framework, and you can try them too!</title>
		<link>http://girliemac.com/blog/2011/07/29/five-css-tricks-used-in-enyo/</link>
		<comments>http://girliemac.com/blog/2011/07/29/five-css-tricks-used-in-enyo/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 03:08:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[Palm]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=264</guid>
		<description><![CDATA[Since I have joined Palm (now HP), I don&#8217;t blog frequently because working for the webOS have kept me super busy. Especially when working on the webOS [...]]]></description>
			<content:encoded><![CDATA[
<p>Since I have joined Palm (now HP), I don&#8217;t blog frequently because working for the webOS have kept me super busy. Especially when working on the webOS 3.0 for the Touchpad tablet, I have been in multiple teams until I switched my position to commit for the Developer Relations team.
</p>
<p>Anyway, in case you are not familiar with webOS and Enyo &#8211; webOS is a mobile platform running on Linux kernel/ webkit UI with V8 engine, so most of core apps are either written in JS and CSS, or native C/C++. And the JS framework for 3.0 is called <em><strong>Enyo</strong></em>.  Basically working on the webOS framework and apps is just like developing web (in fact, I use Chrome for development).  So here, I want to share some cool CSS tracks used in the framework!
</p>
<h2>1. Flexible Box Model</h2>
<p>Enyo&#8217;s basic UI is created with using the <a href="http://www.w3.org/TR/css3-flexbox/" target="_blank">CSS3 flexible box model</a>.<br />
You no longer have to worry about all the <code>float</code> craziness. I actually have written an article, <strong><a href="http://developer.palm.com/blog/2011/07/css-3-flexible-box-model-and-enyo-flex-layout/" target="_blank">CSS 3 Flexible Box Model and Enyo Flex Layout</a></strong> for webOS Developer Blog too, so please read it too!
</p>
<h4>Example:</h4>
<p>When you want to achieve a layout that has an avatar at the left, and two lines of a person&#8217;s info at the right side like this,<br/> </p>
<p><img src="http://girliemac.com/blog/wp-content/uploads/2011/07/flexbox-tweets.png" alt="flex box demo" title="flexbox-tweets" style="border: 1px dotted #ccc; border-radius: 10px; padding:.5em" /><br/></p>
<p>You can create this UI without float if the browser support flex-box:</p>
<pre class="html">
&lt;div class="tweet"&gt;
  &lt;div class="tweet-avatar"&gt;&lt;img src="avatar.png"&gt;&lt;/div&gt;
  &lt;div class="tweet-contents"&gt;
    &lt;div class="tweet-username"&gt;@n00b_css3_user&lt;/div&gt;
    &lt;div class="tweet-text"&gt;Hello, world. CSS3 Flexbox is cool.&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
</pre>
<pre class="css">
.tweet {
  display: -webkit-box;
  -webkit-box-orient: horizontal;
}

.tweet-contents {
  margin-left: .5em;
  display: -webkit-box;
  -webkit-box-flex: 1;
  -webkit-box-orient: vertical;
  -webkit-box-pack: center;
}
</pre>
<p>Note: this is an original spec from 2009 and this is what browsers currently support (if they do), and likely to keep supporting. I have no idea why the spec has been completely re-written recently, but so far no browsers support the new specs.</p>
<h2>2. Root Em </h2>
<p>There is a new unit in CSS, <strong><code>rem</code></strong> unit, which stands for &#8220;root em&#8221;. The sizing only with <code>em</code> could be troublesome because how it relates to the parent&#8217;s font-size. However, the <code>rem</code> is relative to the root, which is html.<br />
In Enyo framework, the root font size is set to 20px. So by using <code>rem</code>, you can set its children font-size easily without being affected by their parents.
</p>
<p>
Here&#8217;s a comparison of em and rem:
</p>
<pre class="html">
&lt;div class="container"&gt;
  &lt;p class="subdue"&gt;48 minutes ago&lt;/p&gt;
&lt;/div&gt;
</pre>
<p>With <code>em</code></p>
<pre class="css">
html {font-size: 20px;}
.container {font-size: .8em}
.subdue {font-size: .75em} /* the font size = 12px (20 x .8 x .75) */
</pre>
<p>With <code>rem</code></p>
<pre class="css">
html {font-size: 20px;}
.container {font-size: .8em}
.subdue {font-size: .75rem} /* the font size = 15px (20 x .75) */
</pre>
<h2>3. Pointer-events</h2>
<p>This is a little obscure and simple trick not everybody has known, and a secret(?) trick I have been using since the earlier webOS framework called Mojo.<br />
The <code>pointer-events</code> property was originally defined for SVG content, and later adopted as a CSS property.<br />
For CSS, there are only two values: <code>auto</code> or <code>none</code>.<br />
You can control the target of the mouth event, and by setting this value none, the element is no longer a target of mouse events, so when a user click the element, it pass through to its descendant during the event bubbling.
</p>
<pre class="html">
&lt;div style="position:relative"&gt;
  &lt;div class="overlay"&gt;&lt;/div&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=""&gt;link 1 on fading list&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=""&gt;link 2 on fading list&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=""&gt;link 3 on fading list&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;div&gt;
</pre>
<pre class="css">
.overlay {
  pointer-events: none;
}
</pre>
<p>
The screenshots at left indicates that when the <code>pointer-events</code> property value is not set (default), the first link underneath of the visual overlay is not clickable, and when it is set none, the element becomes clickable (right).
</p>
<p><img src="http://girliemac.com/blog/wp-content/uploads/2011/07/pointer-events.png" alt="pointer-events demo" title="pointer-events" /></p>
<p>
The demo: <a href="http://jsfiddle.net/girlie_mac/7TvVY/" target="_blank">http://jsfiddle.net/girlie_mac/7TvVY/</a>
</p>
<h2>4. border-image with sprites</h2>
<p>
You have seen some demos how to use the CSS3 <code>border-image</code>.<br />
But making multiple assets used for <code>border-image</code> is trivial because how an image needs to be &#8220;sliced&#8221; into 9 tiles with css.<br />
However, if an each asset in the sprites only requires into 3 tiles. (For example, [static-left] [stretchable center] [static-right], and top and bottom borders are zero, you can create a single sprite image of multiple states of a button, and still be able to achieve the <code>border-image</code>.
</p>
<pre class="css">
.alert-button {
  /* notice the fat border-bottom */
  -webkit-border-image: url(images/alert-button.png) 0 14 111 14 repeat repeat;

  /* notice that border-top and bottom are set zero */
  border-width: 0 14px;

  /* some visual styling here */
  -webkit-box-sizing: border-box;
  height: 37px;
  line-height: 37px;
}

.alert-button:active {
  /* the fat border-top and bottom adjusted */
  -webkit-border-image: url(images/alert-button.png) 37 14 74 14 repeat repeat;
}
</pre>
<p>
<img src="http://girliemac.com/blog/wp-content/uploads/2011/07/border-img-button1.png" alt="border-image demo" title="border-img-button" width="588" height="574" class="alignleft size-full wp-image-313" />
</p>
<p>
The demo: <a href="http://jsfiddle.net/girlie_mac/89C2T/" target="_blank">http://jsfiddle.net/girlie_mac/89C2T/</a>
</p>
<h2>5. Hardware acceleration</h2>
<p>
WebKit enables hardware-acceleration to render CSS 3D transforms. Although some WebKit (like webOS) may not render 3D visuals correctly, it still uses the GPU to speed up. So all you need to take advantage of this is to use the <code>-webkit-transform</code> <a href="http://www.w3.org/TR/css3-3d-transforms/" target="_blank">CSS property</a>!<br />
The easiest possible way to achieve it is using <code>translate3d</code> instead of <code>translate</code> (also <code>scale3d</code> instead of <code>scale</code>), although you are not intend to make your web in 3D visual effect.
</p>
<pre class="css">
.toaster {
  -webkit-transform: translate3d(0,0,0);
}
</pre>
<p>or just set only the z-axis:</p>
<pre class="css">
.toaster {
  -webkit-transform: translateZ(0);
}
</pre>
<p><br/></p>
<p>I hope some of the stuff I just wrote are new to you!<br />
There are more fun stuff I can write about Enyo JS framework, but I keep them for the official <a href="http://developer.palm.com/blog" target="_blank">HP webOS Dev Blog</a>!</p>
<p>Bye now!</p>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2011/07/29/five-css-tricks-used-in-enyo/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Open Web Camp III</title>
		<link>http://girliemac.com/blog/2011/07/19/open-web-camp-iii/</link>
		<comments>http://girliemac.com/blog/2011/07/19/open-web-camp-iii/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 01:18:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[GirlieMac! News]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Nokia]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[Palm]]></category>
		<category><![CDATA[WAP]]></category>
		<category><![CDATA[WebKit]]></category>
		<category><![CDATA[WinMo]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[w3c]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=244</guid>
		<description><![CDATA[I had this wonderful opportunity to speak at OpenWebCamp III at Stanford University on this weekend, and I feel very honor to be there with so many [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://girliemac.com/blog/wp-content/uploads/2011/07/owc-logo-orig.png" alt="owc-logo" />
<p>I had this wonderful opportunity to speak at <a href="http://openwebcamp.org/" target="_blank">OpenWebCamp III</a> at Stanford University on this weekend, and I feel very honor to be there with so many great speakers and attendees. </p>
<p>Apparently, I have been doing mobile development longer than most of people, I picked the subject on developing mobile web, and how it has been changed and what we can do next.</p>
<p>I covered the topics including:</p>
<ul>
<li>How the mobile development has changed from WML, XHTML-MP, HTML4 and finally HTML5 with CSS3
<li>Legacy to HTML5: using input attributes to make easier for a user to type on phone
<li>Dealing with smarter phones: Viewport and Media-queries
<li>High DPI display: CSS pixel != Device pixel
<li>Device API
</ul>
<p><a href="http://girliemac.com/slides/owc3/" target="_blank">My slides, &#8220;WAP to HTML5: Mobile web &#8211; past, present, and future&#8221; is available in html5</a>, not Powepoint or Keynotes so I couldn&#8217;t post it on SlideShare!</p>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2011/07/19/open-web-camp-iii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Demo: CSS3 Fancy Avatar</title>
		<link>http://girliemac.com/blog/2011/02/17/quick-demo-css3-fancy-avatar/</link>
		<comments>http://girliemac.com/blog/2011/02/17/quick-demo-css3-fancy-avatar/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 06:27:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[Sandbox]]></category>
		<category><![CDATA[WebKit]]></category>
		<category><![CDATA[css3]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=225</guid>
		<description><![CDATA[Now I started using jsfiddle for code snippets so I can show the code AND the actual results on browsers. This fancy avatar frame is created pretty [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://girliemac.com/blog/wp-content/uploads/2011/02/css3-avatar.png" alt="css3-avatar" title="css3-avatar" width="413" height="106" class="aligncenter size-full wp-image-227" /></p>
<p>Now I started using jsfiddle for code snippets so I can show the code AND the actual results on browsers.</p>
<p><iframe style="width: 100%; height: 260px" src="http://jsfiddle.net/girlie_mac/cQ99J/embedded/css,html,result"></iframe></p>
<p>This fancy avatar frame is created pretty easily by using CSS box-shadow inset values.<br />
Basically, what I did is that giving a div container (with an avatar picture as a background image) an inset shadow to bottom/right, and glare to top/left. Oh and added border-radius for the rounded corners.</p>
<p>This works without the vendor-specific extensions on latest Firefox, Chrome, Webkit Nightly, and Opera. Safari 5 still requires <code>-webkit</code> extension to make the box-shadow work.</p>
<p>Really easy and practical!</p>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2011/02/17/quick-demo-css3-fancy-avatar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>So it&#8217;s not a secret anymore -HP TouchPad</title>
		<link>http://girliemac.com/blog/2011/02/15/hp-launch/</link>
		<comments>http://girliemac.com/blog/2011/02/15/hp-launch/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 00:17:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Event]]></category>
		<category><![CDATA[Palm]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[HP]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=214</guid>
		<description><![CDATA[So, this is what has been keeping me busy (not blogging) these days. Announcing HP TouchPad! I have been working as a part of the development team [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://girliemac.com/blog/2011/02/15/hp-launch/5431723291_8b5d51eccb/" rel="attachment wp-att-217"><img src="http://girliemac.com/blog/wp-content/uploads/2011/02/5431723291_8b5d51eccb.jpg" alt="Jon Rubinstein" title="Jon Rubinstein" width="500" height="333" class="aligncenter size-full wp-image-217" /></a></p>
<p>So, this is what has been keeping me busy (not blogging) these days. Announcing HP TouchPad!
<p>I have been working as a part of the development team for the secret weapon, which was just announced at the HP&#8217;s press event at Fort Mason, San Francisco on Feb. 9th, for a while (especially hardware development take a lot longer than software!). Literally, my heart was beating during the live demo but when the crowd applauded, I felt great and so relieved. </p>
<p>At the evening&#8217;s developer event after the press event, we have announced the new and better JavaScript framework, Enyo. I probably write up something on HP/Palm&#8217;s developer blog later (yes, the site still has the Palm brand!), so stay tuned if you&#8217;re interested developing for webOS!</p>
<p><em>The photo is by HP Startup Central, on <a href="http://www.flickr.com/photos/hpstartupcentral/5431723291/in/set-72157625889052543/" target="_blank">Flickr</a></em></p>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2011/02/15/hp-launch/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

