<?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>Thu, 29 Mar 2012 22:56:22 +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>Creating Non-disruptive Notifications with HTML5</title>
		<link>http://girliemac.com/blog/2012/03/29/creating-non-disruptive-notifications-with-html5/</link>
		<comments>http://girliemac.com/blog/2012/03/29/creating-non-disruptive-notifications-with-html5/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 20:59:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Palm]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=476</guid>
		<description><![CDATA[The HTML5 Web Notifications API (now available on Chrome) allows you to display the Growl-like notification windows outside of the web browser window. Unlike the alert dialog, [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://girliemac.com/blog/wp-content/uploads/2012/03/notifications.png" alt="web notifications" title="notifications" class="aligncenter" /></p>
<p>The <strong>HTML5 Web Notifications API</strong> (now available on Chrome) allows you to display the Growl-like notification windows outside of the web browser window. Unlike the alert dialog, the notification windows do not disrupt a user&#8217;s action, or requires extra user interactions.</p>
<p>Using the API is quite simple, so I tried to replicate the infamous webOS notification system in HTML5. (In case you are not familiar with webOS UI and UX, see it on <a href="http://www.youtube.com/watch?v=G8tFODkacak" target="_blank">YouTube</a>). </p>
<p>Live demo: <a href="http://girliemac.github.com/html5-notifications-webOS-style" target="_blank">http://girliemac.github.com/html5-notifications-webOS-style</a></p>
<h2>Basic Notifications</h2>
<p>First, check if the browser supports the API, by looking for the Notifications property.</p>
<pre class="js">
if (window.webkitNotifications)
</pre>
<p>Apparently, it is only supported by WebKit-based browser (well, Chrome, so far) so you need to add the vender prefix, instead of just <code>webkitNotifications</code>.</p>
<p>Next, your script needs to requests the user agent to ask a user for permission to show notifications. If you are already familiar with the <em>geolocation</em> API, you have seen the &#8220;Info bar&#8221; on top of the browser.</p>
<p><img src="http://girliemac.com/blog/wp-content/uploads/2012/03/notifications-permission.png" alt="permission bar" title="notifications-permission" /></p>
<p>To request the permission by <code>requestPermission()</code>, you must invoke some event from a user, such as mouse click. See the example below:</p>
<pre>
document.getElementById('#someButton').addEventListener('click', function() {
  // check if a permission is set allowed
  if (window.webkitNotifications.checkPermission() == 0) { // Allowed
    // do show the notifications
  } else {
    // request a user permission
    window.webkitNotifications.requestPermission();
  }
}, false);
</pre>
<p>There are two ways to create the notifications &#8211; plain text or html.</p>
<p>1. Plain text- use <code>createNotification</code> function that takes three optional params, icon image, title, and text:</p>
<pre>
var notification = window.Notifications.createNotification(
  'avatar.png',
  'New tweet from @girlie_mac',
  'OMG, a glass of water! http://instagr.am/p/...'
);
</pre>
<p>2. HTML &#8211; use <code>createHTMLNotification</code> to include an external html file:</p>
<pre>
var notification = window.webkitNotifications.createHTMLNotification('tweet.html');
</pre>
<p>To show the notification:</p>
<pre>
notification.show();
</pre>
<p>Also, you can use the <code>cancel</code> method to close the notifications if you wish. This example below let the notification close by itself 5 second after it is displayed:</p>
<pre>
notification.ondisplay = function(event) {
  setTimeout(function() {
    event.currentTarget.cancel();
    }, 5000);
}
</pre>
<p>Besides the <code>ondisplay</code>, other event handlers available are:<br />
<code>onclick</code>, <code>onshow</code>, <code>onerror</code>, and <code>onclose</code>.</p>
<p>In my demo, I used the HTML notifications because only the HTML notification style allows you to fully customize the UI with CSS and add some UX with JavaScript.<br />
To create the webOS-esque &#8220;slide-to-dismiss&#8221; effect, I used jQuery UI&#8217;s draggable and droppable. (I attempted to use the HTML5 drag and Drop, but for some reasons, I could not successfully make my code work within the notification window, although the code does work in a regular window.)<br />
The source code is on <a href="https://github.com/girliemac/html5-notifications-webOS-style" target="_blank">github</a>.</p>
<p>Hopefully, this API will be available on other browsers. (And Klout will replace the modal dialogs from hell to something more subtle like the web notifications in future. Can you believe once they had me to close seven modals after logging in? This has to be stopped no matter what.)</p>
<h2>References</h2>
<p><a href="<br />
http://dev.w3.org/2006/webapi/WebNotifications/publish/" target="_blank">W3C Draft</a><br />
<a href="http://www.chromium.org/developers/design-documents/desktop-notifications/api-specification" target="_blank">Chromium API Specification</a><br />
<a href="http://www.html5rocks.com/en/tutorials/notifications/quick/" target="_blank">HTML5 ROCKS</a></p>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2012/03/29/creating-non-disruptive-notifications-with-html5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Making Chupa-Chups using CSS3 Pseudo-elements</title>
		<link>http://girliemac.com/blog/2012/03/24/making-chupa-chups-using-css3-pseudo-elements/</link>
		<comments>http://girliemac.com/blog/2012/03/24/making-chupa-chups-using-css3-pseudo-elements/#comments</comments>
		<pubDate>Sun, 25 Mar 2012 03:17:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=450</guid>
		<description><![CDATA[One of the biggest reasons why I don&#8217;t blog often is probably because I tweet a lot. Just write a few words and throw some jsfiddle or [...]]]></description>
			<content:encoded><![CDATA[
<p>One of the biggest reasons why I don&#8217;t blog often is probably because I tweet a lot. Just write a few words and throw some jsfiddle or Dabblet URLs in 140 chars, and boom, I can reach sizable numbers of people. It was quick and easy for me when I had busy days&#8230;</p>
<p>Well, now, I have lost my job at Hewlett-Packard (as they ditched Palm hardware then dumped the webOS software as open-source, they no longer need me and my hard-working teammates), so I should no longer excuse for not writing. So here I am, I decide to write up about CSS3 shapes from the fiddles I have written recently:</p>
<h2>Shapes with CSS3 Part.1 &#8211; Heart</h2>
<p><img src="http://girliemac.com/blog/wp-content/uploads/2012/03/css3-valentine.png" alt="CSS3 Valentine's heart-shaped chocolate" title="css3-valentine" width="200" height="200" align="left" /> </p>
<p>Heart-shaped chocolate live demo: <a href="http://dabblet.com/gist/2190614" target="_blank">http://dabblet.com/gist/2190614</a></p>
<p>This Valentine&#8217;s Day demo (I really did make this on Feb.14!) shows how to create a heart shape.<br />
Basic idea behind is that creating two rectangles with round-corners on top-left and top-right, and rotate each object in either positive or negative 45 degrees. The trick of making two objects in one HTML element is using pseudo-elements, <code>::before</code> and <code>::after</code>.<br />
This code snipet shows how to create a simple heart-shape:<br clear="both"/></p>
<pre class="css">
.heart {
	position: relative;
}
.heart::before,
.heart::after {
	content: "";
	position: absolute;
	top: 0;
	background-color: red;
	width: 150px;
	height: 240px;
	border-radius: 75px 75px 0 0;
}
.heart::before {
	left: 0px;
	transform: rotate(-45deg);
	background-color: red;
}
.heart::after {
	left: 64px;
	transform: rotate(45deg);
}
</pre>
<p>In this example, I omit the vender prefix, but you do need to include them, for example, <code>-webkit-transform</code> to be able to make this code work on the current browsers.</p>
<h2>Shapes with CSS3 Part.2 &#8211; Flower</h2>
<p><img src="http://girliemac.com/blog/wp-content/uploads/2012/03/css3-chupachups.png" alt="css3 Chupa Chups" title="css3-chupachups" width="200" height="200" align="left" /> </p>
<p>Chupa-Chupsy live demo: <a href="http://dabblet.com/gist/2190662" target="_blank">http://dabblet.com/gist/2190662</a></p>
<p>This Chupa-Chups, or I&#8217;d call it Chupa-Chupsy candy, since I cannot replicate the actual design of the candy wrapper accurately. (Oh, by the way, did you know the logo was created by the surreal artist, Salvador Dalí? <a href="http://www.fastcodesign.com/1669224/salvador-dal-s-real-masterpiece-the-logo-for-chupa-chups-lollipops" target="_blank">Seriously</a>.)</p>
<p>So I tried to mimic the signature yellow flower-shape, with one HTML element using the pseudo-element. This shape is made with a combination of two rounded-corner squares. One of the square is rotated to 45 degrees.<br />
This is how to create the basic flower-shape:</p>
<pre class="css">
.flower-shape {
    position: relative;
}
.flower-shape,
.flower-shape::before {
    width: 200px;
    height: 200px;
    border-radius: 25%;
    background: yellow;
}
.flower-shape::before {
    content: "";
    position: absolute;
    transform: rotate(45deg);
}
</pre>
<p>In this example, I used only <code>::before</code> pseudo-element, instead of both <em>before</em> and <em>after</em>. Although I used both for the heart-shape example (which is made with two rectangles), technically, you can include three objects into one HTML element by inserting each object before and after the object on the element. </p>
<p>So if you&#8217;d like to have a flower with 12 petals, you can define <code>.flower-shape::after</code>, which is rotated in 30deg. Make sure to make the <code>.flower-shape::before</code> in -30deg.</p>
<p>To mimic the candy logo, I used the most similar web-font I found on <a href="http://www.google.com/webfonts" target="_blank">Google Web Font</a>. Once you see the real Chupa-Chups logo, you&#8217;ll see this web-font is actually nothing resembling it. But, hey.</p>
<h2>Shapes with CSS3 Part.3 &#8211; Speech Bubble</h2>
<p><img src="http://girliemac.com/blog/wp-content/uploads/2012/03/css3-klout.png" alt="Klout flag" title="css3-klout" width="200" height="180" align="left" /></p>
<p>Klout Score Flag demo: <a href="http://jsfiddle.net/girlie_mac/2uk6U/" target="_blank">http://jsfiddle.net/girlie_mac/2uk6U/</a></p>
<p>This is a no-image replica of the <a href="http://klout.com/girlie_mac" target="_blank">Klout</a> score flag! Creating this speech-bubble style shape used the same technique using <code>::after</code> pseudo-element.<br />
The method of making the triangle shape is the good&#8217;ol CSS2 border shading trick using border-width and border-color. Giving think borders around a box with zero width and height. The triangle size is determined by the border-width, with the given color on the one side and transparent on the rest of the sides. You can read more about how to create a triangle on <a href="http://css-tricks.com/snippets/css/css-triangle/" target="_blank">CSS-Tricks.</a></p>
<p>The basic shape can be coded like this:</p>
<pre class="css">
.speech {
    background-color: orange;
    width: 200px;
    height: 160px;
    border-radius: 10px;
    position: relative;
}
.speech:after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-bottom: 28px solid transparent;
    border-right: 58px solid orange;
    position: absolute;
    right: 0;
}
</pre>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2012/03/24/making-chupa-chups-using-css3-pseudo-elements/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<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(<del>30%</del>);
</pre>
<p><del>The default is 100%. Values of amount over 100% are allowed.</del><br />
<strong>Updated</strong>: I am not sure when it has modified, but it seems that not the accepted value is the range between -100% (dark) and 100% (light), and the default is 0.<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>11</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>
	</channel>
</rss>

