<?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 &#187; Dev</title>
	<atom:link href="http://girliemac.com/blog/category/dev/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>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[
<div class="topsy_widget_data topsy_theme_jade" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fgirliemac.com%252Fblog%252F2011%252F12%252F21%252Fquick-fun-css3-filter-effects%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fis.gd%2Fww3fYB%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Quick%20Fun%3A%20CSS3%20Filter%20Effects%22%20%7D);"></div>
<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>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[
<div class="topsy_widget_data topsy_theme_jade" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fgirliemac.com%252Fblog%252F2011%252F10%252F26%252Fcreating-usable-enyo-ui-buttons-and-interactive-dialogs%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fis.gd%2FD5tie3%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Creating%20Usable%20Enyo%20UI%20-%20Buttons%20and%20Interactive%20Dialogs%22%20%7D);"></div>
<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>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[
<div class="topsy_widget_data topsy_theme_jade" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fgirliemac.com%252Fblog%252F2011%252F07%252F29%252Ffive-css-tricks-used-in-enyo%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fis.gd%2F0BiS8L%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Five%20CSS%20tricks%20used%20in%20Enyo%20JS%20Framework%2C%20and%20you%20can%20try%20them%20too%21%22%20%7D);"></div>
<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>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[
<div class="topsy_widget_data topsy_theme_jade" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fgirliemac.com%252Fblog%252F2011%252F02%252F17%252Fquick-demo-css3-fancy-avatar%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fis.gd%2Fvkqh04%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Quick%20Demo%3A%20CSS3%20Fancy%20Avatar%20%23css3%22%20%7D);"></div>
<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>Quick Demo: Webkit CSS3 Mask with SVG</title>
		<link>http://girliemac.com/blog/2010/09/20/201/</link>
		<comments>http://girliemac.com/blog/2010/09/20/201/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 00:27:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[Sandbox]]></category>
		<category><![CDATA[WebKit]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[svg]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=201</guid>
		<description><![CDATA[I haven&#8217;t got a chance to create the apps and demos I&#8217;ve been thinking because my day job at Palm has kept me really busy. (Yeah, we&#8217;re [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_jade" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fgirliemac.com%252Fblog%252F2010%252F09%252F20%252F201%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fis.gd%2F19wIpL%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Quick%20Demo%3A%20Webkit%20CSS3%20Mask%20with%20SVG%20%23css3%20%23svg%22%20%7D);"></div>
<p>I haven&#8217;t got a chance to create the apps and demos I&#8217;ve been thinking because my day job at Palm has kept me really busy. (Yeah, we&#8217;re shipping webOS 2.0 pretty soon!)<br />
So instead of writing a new material, I decided to post the stuff I was testing around a while ago because SVG seems to be a hot topic since the HTML5 buzz!</p>
<p><img src="http://girliemac.com/blog/wp-content/images/svg-mask.png" align="right"/>This is an example of CSS mask with SVG. -The CSS alpha mask is introduced by <a href="http://webkit.org/blog/181/css-masks/" target="_blank">Webkit.org</a> back in 2008.</p>
<p>And this image at the right is a screen capture from WebKit Nightly browser. The photo I use here is a Twitter avatar photo of <a href="http://twitter.com/SOCKINGTON" target="_blank">@sockington</a>, masked with an <a href="http://girliemac.com/sandbox/svg/twitter-bird-new.svg">SVG file</a> (I used the vector image created by <a href="http://eagl0r.deviantart.com/#/d2yth6g" target="_blank">eagl0r</a> on DeviantArt and converted it as as SVG with Adobe Illustrator) with using Webkit-only CSS 3 property, <code style="font-weight:bold">-webkit-mask</code>.
</p>
<p>
<a href="http://girliemac.com/sandbox/mask.html" target="_blank">The actual demo is here.</a><br />
This works only on advanced webkit-browsers with SVG support, such as Safari 4+ and Chrome 2+ (not sure. I need to check). Android webkit browsers currently do not support SVG.<br />
For non-supporting browsers, you should just see three rectangle pictures as fallback. Nothing should look broken.
</p>
<h3>The code is Simple</h3>
<pre class="html">
<code>
&lt;img class="avatar" src="avatar-pic.png"/&gt;
</code>
</pre>
<pre class="css">
<code>
.avatar {
  -webkit-mask-box-image: url(twitter-bird.svg);
}
</code>
</pre>
<p>I used <code>mask-box-image</code> instead of <code>mask-image</code> to make the mask stretch to fit with various image sizes and aspect ratio. <code>mask-image</code> repeats the mask images as patterns (also you can specify the type of repeat, and position etc. I am not going to talk about them here but you can read on the reference link below).<br />
<h3>Reference</h3>
<p><strong>Surfin&#8217; Safari (webkit.org)</strong> &#8211; <a href="http://webkit.org/blog/181/css-masks/"  target="_blank"> CSS Masks</a></p>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2010/09/20/201/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Simulating MacOS Dock-like menu with CSS3</title>
		<link>http://girliemac.com/blog/2010/06/02/simulating-macos-dock-like-menu-with-css3/</link>
		<comments>http://girliemac.com/blog/2010/06/02/simulating-macos-dock-like-menu-with-css3/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 06:14:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Sandbox]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=173</guid>
		<description><![CDATA[Since my original &#8220;CSS Aqua button&#8221; written last year, I have seen more and more fan CSS3 UI mimic of MacOS components around! I think I have [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_jade" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fgirliemac.com%252Fblog%252F2010%252F06%252F02%252Fsimulating-macos-dock-like-menu-with-css3%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Simulating%20MacOS%20Dock-like%20menu%20with%20CSS3%22%20%7D);"></div>
<p><img src="http://girliemac.com/blog/wp-content/images/dock-screenshot.jpg" alt="css3 Dock screenshot"/></p>
<p>
Since my original &#8220;CSS Aqua button&#8221; written last year, I have seen more and more fan CSS3 UI mimic of MacOS components around! I think I have seen some Mac docks too, but as I remember they all use jQuery.<br />
So I was thinking about making one only with CSS.
</p>
<p>Initially I thought it was easy &#8211; let&#8217;s make an hovered icon larger like 200%, and make siblings in 150% of the original size using CSS sibling selector, and done! A piece of cake, huh? &#8211; Then I realized I made a mistake. The adjacent-sibling selector apply to an element which is immediately <em>after</em> the element in markup, not both before and after.<br />
Oh well, so I needed to write a minimal JavaScript (so you don&#8217;t need to import a whole JS library) to add a class name to the element comes before the hovered object.</p>
<p>Anyway, here&#8217;s the <a href="http://girliemac.com/sandbox/dock.html" target="_blank">live-demo!</a> (Try it with the the latest Webkit Nightly or Safari 4) for the best experience!), and I&#8217;ll show you how I did-
</p>
<h3>Markup (Simplified)</h3>
<p>Let&#8217;s create menu items as a list.</p>
<pre class="html">
<code>
&lt;div id="dock-container"&gt;
  &lt;div id="dock"&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href="http://android.com"&gt;&lt;img src="images/dock-icons/android.png"/>&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://palm.com"&gt;&lt;img src="images/dock-icons/palm.png"/&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;...
  &lt;/ul&gt;
  &lt;div class="base"&gt;&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
</code>
</pre>
<p>The list should be displayed horizontally by setting the style to <code>#dock li {display:inline-block}</code>. Please see the source code from the demo for the details.
</p>
<h3>Magnify the icon with CSS transform</h3>
<p>
<img style="border:1px solid #666;" src="http://girliemac.com/blog/wp-content/images/dock-tutorial.png" align="right"/>First, let&#8217;s define the dock icon animation with css transition.<br />
The origin of the transform has to set to bottom, so the icon doesn&#8217;t scale from the middle of the icon. (Diagram #1).</p>
<p>I used only a webkit extension for this example but you can use <code>-moz</code> and <code>-o</code> extensions, for Firefox and Opera respectively.</p>
<p>Then, set the hover state &#8211; use css transform to scale the icon image up to 200%. Also you need to add some margin otherwise the enlarged icon overlaps with neighboring icons!
</p>
<pre class="css">
<code>
#dock li img {
  width: 64px;
  height: 64px;
  -webkit-box-reflect: below 2px
		    -webkit-gradient(linear, left top, left bottom, from(transparent),
		    color-stop(0.7, transparent), to(rgba(255,255,255,.5))); /* reflection is supported by webkit only */
  -webkit-transition: all 0.3s;
  -webkit-transform-origin: 50% 100%;
}
#dock li:hover img {
  -webkit-transform: scale(2);
  margin: 0 2em;
}
</code>
</pre>
<h3>Magnify adjacent icons</h3>
<pre class="css">
<code>
#dock li:hover + li img,
#dock li.prev img {
  -webkit-transform: scale(1.5);
  margin: 0 1.5em;
}
</code>
</pre>
<p>To magnify the icon at the right hand side of the hovered icon (Diagram #2), all you need to do is define the scale with using a CSS adjacent-sibling selector, E + F (an F element immediately preceded by an E element).</p>
<p>For the icon at the left (Diagram #3), ss I mentioned earlier, there is no css to get the <em>previous</em> sibling, so I need to rely on JavaScript.<br />
I used the DOM node interface, <code>previousElementSibling</code> to access the sibling node. <code>previousElementSibling</code> should be supported by Webkit, Opera and Firefox.</p>
<p>Basically what I am doing here is that get the mouseovered object (should be an img element), find the parent li element (the immediate parent should be an a-alement, not a li, so get a&#8217;s parent! Check the HTML code again!), find the previous sibling li, then give a classname &#8220;prev&#8221; so I can apply the style.<br />
Don&#8217;t forget to remove the class name as mouseout, otherwise the icon stays large.
</p>
<pre class="js">
<code>
function addPrevClass (e) {
  var target = e.target;
    if(target.getAttribute('src')) { // check if it is img
      var li = target.parentNode.parentNode;
      var prevLi = li.previousElementSibling;
      if(prevLi) {
        prevLi.className = 'prev';
      }

      target.addEventListener('mouseout', function() {
        prevLi.removeAttribute('class');
      }, false);
  }
}
if (window.addEventListener) {
  document.getElementById("dock").addEventListener('mouseover', addPrevClass, false);
}
</code>
</pre>
<p>For more details with the fancy CSS3 effects (e.g. the gradient and 3D-transform to create the &#8220;base&#8221; of the dock), please see the source code of the <a href="http://girliemac.com/sandbox/dock.html" target="_blank">demo page!</a></p>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2010/06/02/simulating-macos-dock-like-menu-with-css3/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>CSS3 Box-Shadow with Inset Values &#8211; The Aqua Button ReReVisited!</title>
		<link>http://girliemac.com/blog/2010/02/04/css3-box-shadow-with-inset-values-the-aqua-button-rerevisited/</link>
		<comments>http://girliemac.com/blog/2010/02/04/css3-box-shadow-with-inset-values-the-aqua-button-rerevisited/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 05:22:32 +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>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=151</guid>
		<description><![CDATA[This is my third article on CSS3 No Image Aqua Buttons. The previous articles include: CSS3 Gradients: No Image Aqua Button CSS3 Aqua Button – Revisited for [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_jade" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fgirliemac.com%252Fblog%252F2010%252F02%252F04%252Fcss3-box-shadow-with-inset-values-the-aqua-button-rerevisited%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22CSS3%20Box-Shadow%20with%20Inset%20Values%20-%20The%20Aqua%20Button%20ReReVisited%21%20%22%20%7D);"></div>
<p><a href="http://girliemac.com/sandbox/button.html"><img alt="Screenshot ot CSS Aqua buttons" src="http://girliemac.com/blog/wp-content/images/screenshot_css3button_2.png" title="Screenshot" width="224" height="135" align="right" /></a></p>
<p>This is my third article on CSS3 No Image Aqua Buttons. The previous articles include:</p>
<ol>
<li><a href="http://girliemac.com/blog/2009/04/30/css3-gradients-no-image-aqua-button/" target="_blank">CSS3 Gradients: No Image Aqua Button</a></li>
<li><a href="http://girliemac.com/blog/2010/01/28/css3-aqua-button-revisited-for-firefox-3-6/" target="_blank">CSS3 Aqua Button – Revisited for Firefox 3.6</a></li>
<li>And this one &#8211; Read on!</li>
</ol>
<p>Since Smashing Magazine has selected the original Aqua button demo for their article, <a href="http://www.smashingmagazine.com/2010/02/01/50-brilliant-css3-javascript-coding-techniques/" target="_blank">&#8220;50 Brilliant CSS3/JavaScript Coding Techniques&#8221;</a>, I have had so much more visitors to my blog. </p>
<p>This resulted quality developers leave useful comments and tips for me &#8211; thank you, <a href="http://girliemac.com/blog/2010/01/28/css3-aqua-button-revisited-for-firefox-3-6/#comment-1411" target="_blank">Zoley</a> for suggesting using <code>box-shadow</code> with the <em>inset</em> value, and a big thank you to <a href="http://girliemac.com/blog/2010/01/28/css3-aqua-button-revisited-for-firefox-3-6/#comment-1428" target="_blank">Jim</a> for actually re-writing the Aqua button with the technique!!!</p>
<p>So, now the CSS3 Aqua button is revised with semantic markup (no more &#8220;glare&#8221; div! Yes, I complained it by myself before!) and shorter CSS.<br />
And this time, no CSS gradients! &#8211; use CSS <code>box-shadow</code> property with multiple <em>inset</em> values to draw layers of inner-shadows to create the visual effect.</p>
<h3>Syntax</h3>
<p><code>(-moz-)box-shadow:  none | &lt;shadow&gt; [,&lt;shadow&gt;]*    where &lt;shadow&gt; is defined as:  inset? &#038;&#038; [ &lt;offset-x&gt; &lt;offset-y&gt; &lt;blur-radius&gt;? &lt;spread-radius&gt;? &#038;&#038; &lt;color&gt;? ]<br />
</code></p>
<h3>Values</h3>
<p>from <a href="https://developer.mozilla.org/en/CSS/-moz-box-shadow" target="_blank">Mozilla Developer Center</a>:</p>
<blockquote><p>
<strong>inset (optional)</strong><br />
If not specified (default), the shadow is assumed to be a drop shadow (as if the box were raised above the content).<br />
The presence of the <code>inset</code> keyword changes the shadow to one inside the frame (as if the content was depressed inside the box). Inset shadows are drawn above background, but below border and content.<br/><br />
<strong>&lt;color&gt; (optional)</strong><br />
If not specified, the color depends on the browser. In Gecko (Firefox), the value of the <code>color</code> property is used. Safari&#8217;s shadow is transparent and therefore useless if &lt;color&gt; is omitted.<br/><br />
<strong>&lt;offset-x&gt; &lt;offset-y&gt; (required)</strong><br />
This are two &lt;length&gt; values to set the shadow offset. &lt;offset-x&gt; specifies the horizontal distance. Negative values place the shadow to the left of the element. &lt;offset-y&gt; specifies the vertical distance. Negative values place the shadow above the element.<br />
If both values are 0, the shadow is placed behind the element (and may generate a blur effect if &lt;blur-radius&gt; and/or &lt;spread-radius&gt; is set).<br/><br />
<strong>&lt;blur-radius&gt; (optional)</strong><br />
This is a third &lt;length&gt; value. The higher this value, the bigger the blur, so the shadow becomes bigger and lighter. If not specified, it will be 0.<br/><br />
<strong>&lt;spread-radius&gt; (optional)</strong><br />
This is a fourth &lt;length&gt; value. Positive values will cause the shadow to expand and grow bigger, negative values will cause the shadow to shrink. If not specified, it will be 0 (the shadow will be the same size as the element).<br />
<strong></strong><br/>
</p></blockquote>
<p>Note &#8211; The <code>box-shadow</code> property has been removed from <a href="http://www.w3.org/TR/css3-background/#the-box-shadow" target="_blank">W3C CSS3 Background</a> Candidate recommendation document.</p>
<h3>The Entire Code!</h3>
<p>Use <code>-moz</code> and <code>-webkit</code> prefix for <code>box-shodow</code> to support these browsers. For Opera, there&#8217;s no need to add <code>-o</code>.</p>
<p>Also, notice there are three <code>inset</code> values are defined for detailed visual effects!</p>
<pre class="html">
<code>
&lt;input type="button" class="new-aqua" value="Login"/&gt;
</code>
</pre>
<pre class="css">
<code>
input[type=button].new-aqua {
  width: 155px;
  height: 35px;
  background: #cde;
  border: 2px solid #ccc;
  border-color: #8ba2c1 #5890bf #4f93ca #768fa5;
  font: 600 16px/1 Lucida Sans, Verdana, sans-serif;
  color: #fff;
  text-shadow: rgba(10, 10, 10, 0.5) 1px 2px 2px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  border-radius: 16px; -moz-border-radius: 16px; -webkit-border-radius: 16px;
  box-shadow: 0 10px 16px rgba(66, 140, 240, 0.5), inset 0 -8px 12px 0 #6bf, inset 0 -8px 0 8px #48c, inset 0 -35px 15px -10px #7ad;
  -moz-box-shadow: 0 10px 16px rgba(66, 140, 240, 0.5), inset 0 -8px 12px 0 #6bf, inset 0 -8px 0 8px #48c, inset 0 -35px 15px -10px #7ad;
  -webkit-box-shadow: 0 10px 16px rgba(66, 140, 240, 0.5), inset 0 -8px 12px 0 #6bf, inset 0 -8px 0 8px #48c, inset 0 -35px 15px -10px #7ad;
}
.new-aqua:hover {
  text-shadow: rgb(255, 255, 255) 0px 0px 5px;
}
</code>
</pre>
<p><br/></p>
<p>View the <a href="http://girliemac.com/sandbox/button.html" target="_blank">live demo page</a>! This new aqua button works on FF 3.6, Webkit 4 (the current Safari 4 doesn&#8217;t support inset box-shadow yet), Chrome 4 and Opera 10. (But fails on 10.1 on Mac).</p>
<p style="color:#777"><em>* Edited on Feb.5 &#8211; Opera 10.1 fail and Safari4 (I noticed this works only on Webkit Nightly after published this!)</em></p>
<p>And again, a huge thanks to <a href="www.coroflot.com/trickitty" target="_blank">Jim Green</a> for the revised CSS!</p>
<h3>References</h3>
<ul style="margin-top:1em">
<li><a href="http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html" target="_blank">Safari CSS Reference</a> by Apple Safari Dev Center</li>
<li><a href="https://developer.mozilla.org/en/CSS/-moz-box-shadow" target="_blank">-moz-box-shadow</a> by Mozilla Developer Center</li>
<li><a href="http://dev.opera.com/articles/view/css3-border-background-boxshadow/" target="_blank">CSS3 borders, backgrounds and box-shadows</a> by Dev.Opera</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2010/02/04/css3-box-shadow-with-inset-values-the-aqua-button-rerevisited/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>CSS3 Aqua Button &#8211; Revisited for Firefox 3.6</title>
		<link>http://girliemac.com/blog/2010/01/28/css3-aqua-button-revisited-for-firefox-3-6/</link>
		<comments>http://girliemac.com/blog/2010/01/28/css3-aqua-button-revisited-for-firefox-3-6/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 21:17:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Sandbox]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=129</guid>
		<description><![CDATA[This is an update for the Aqua button tutorial. This update will add a support for Firefox 3.6. If you haven&#8217;t seen the article, please go read [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_jade" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fgirliemac.com%252Fblog%252F2010%252F01%252F28%252Fcss3-aqua-button-revisited-for-firefox-3-6%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22CSS3%20Aqua%20Button%20-%20Revisited%20for%20Firefox%203.6%22%20%7D);"></div>
<p>This is an update for the <a href="http://girliemac.com/blog/2009/04/30/css3-gradients-no-image-aqua-button/">Aqua button tutorial</a>. This update will add a support for Firefox 3.6. If you haven&#8217;t seen the article, please go read it before proceeding here.</p>
<p><br/></p>
<p>
<a href="http://girliemac.com/sandbox/button.html"><img alt="Screenshot ot CSS Aqua buttons" src="http://girliemac.com/blog/wp-content/images/screenshot_css3button_new.png" title="Screenshot" width="224" height="135" align="right" /></a></p>
<p>On the end of November last year, <a href="http://hacks.mozilla.org/2009/11/css-gradients-firefox-36/" target="_blank">Mozilla Hacks announced</a> the support for CSS gradient in a background on upcoming Firefox 3.6 (which final version has just released recently). </p>
<p>As already been supported on WebKit, FF does support both linear and radial gradient, however, Mozilla has implemented differently &#8211;<br />
Most noticeably, Mozilla separate linear and radial gradient as <code>-moz-linear-gradient</code> and <code>-moz-radial-gradient</code>, while on WebKit, the syntax goes <code>-webkit-gradient</code> and you specify linear or radial.</p>
<p>Also the specification of each value is different too.<br />
If you want a linear gradient starting from red on top to ending at bottom in white, you need to define &#8211; </p>
<p>WebKit:<br />
<code>background: -webkit-gradient(linear, left top, right bottom, from(red), to(white)))</code><br />
Firefox:<br />
<code>background: -moz-linear-gradient(top, red, white);<br />
</code>
</p>
<h3>The Aqua Button Redefined</h3>
<p>Let&#8217;s re-create the aqua button, by adding <code>-moz</code> prefixed gradient definitions:</p>
<p>The button:</p>
<pre class="css">
<code>
.aqua{
  background-color: rgba(60, 132, 198, 0.8);
  border-top-color: #8ba2c1;
  border-right-color: #5890bf;
  border-bottom-color: #4f93ca;
  border-left-color: #768fa5;
  -webkit-box-shadow: rgba(66, 140, 240, 0.5) 0px 10px 16px;
  -moz-box-shadow: rgba(66, 140, 240, 0.5) 0px 10px 16px;
  background-image: -webkit-gradient(linear, 0% 0%, 0% 90%, from(rgba(28, 91, 155, 0.8)), to(rgba(108, 191, 255, .9)));
/* for FF 3.6 */
  background-image: -moz-linear-gradient(rgba(28, 91, 155, 0.8) 0%, rgba(108, 191, 255, .9) 90%);
}
</code>
</pre>
<p>and the glare:</p>
<pre class="css">
<code>
.button .glare {
  position: absolute;
  top: 0;
  left: 5px;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  height: 1px;
  width: 142px;
  padding: 8px 0;
  background-color: rgba(255, 255, 255, 0.25);
  background-image: -webkit-gradient(linear, 0% 0%, 0% 95%, from(rgba(255, 255, 255, 0.7)), to(rgba(255, 255, 255, 0)));
  /* for FF 3.6 */
  background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 95%);
}
</code>
</pre>
<p>This is <a href="http://girliemac.com/sandbox/button.html" target="_blank">the actual html page</a>. Open it on Firefox 3.6 and see!</p>
<h3>More Info on Mozilla CSS Gradients</h3>
<ul style="margin-top:1em">
<li><a href="http://hacks.mozilla.org/2009/11/css-gradients-firefox-36/" target="_blank">CSS gradients in Firefox 3.6</a> by HACKS.MOZILLA.ORG</li>
<li><a href="https://developer.mozilla.org/index.php?title=en/CSS/-moz-linear-gradient" target="_blank">-moz-linear-gradient</a> by Mozilla Developer Center</li>
<li><a href="https://developer.mozilla.org/index.php?title=en/CSS/-moz-radial-gradient" target="_blank">-moz-radial-gradient</a> by Mozilla Developer Center</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2010/01/28/css3-aqua-button-revisited-for-firefox-3-6/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>I Can Has iPhone App on App Store</title>
		<link>http://girliemac.com/blog/2009/12/29/i-can-has-iphone-app-on-app-store/</link>
		<comments>http://girliemac.com/blog/2009/12/29/i-can-has-iphone-app-on-app-store/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 03:17:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[App]]></category>
		<category><![CDATA[GirlieMac! News]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPod]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=126</guid>
		<description><![CDATA[Finally, I have my app, called iCanHasLOL published on App Store! Actually the app was reviewed within 24 hours by Apple, although I&#8217;ve heard it would usually [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_jade" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fgirliemac.com%252Fblog%252F2009%252F12%252F29%252Fi-can-has-iphone-app-on-app-store%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22I%20Can%20Has%20iPhone%20App%20on%20App%20Store%22%20%7D);"></div>
<p>Finally, I have my app, called <a href="itms://itunes.apple.com/us/app/icanhaslol/id348582423?mt=8">iCanHasLOL published on App Store</a>!<br />
Actually the app was reviewed within 24 hours by Apple, although I&#8217;ve heard it would usually take 2 weeks. </p>
<p>I mentioned that I had been writing an iPhone app using Appcelerator before, and an app was almost ready to go. However, I was not able to publish it with the particular contents so I re-wrote the app and re-created some graphics to finish up this brand-new app.</p>
<p>This is free of charge also ad-free (for now, at least!) so <a href="itms://itunes.apple.com/us/app/icanhaslol/id348582423?mt=8">get your copy</a> now!</p>
<div align="center">
<object width="245" height="496" ><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=8146081&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff0179&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=8146081&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff0179&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="245" height="496"></embed></object>
</div>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2009/12/29/i-can-has-iphone-app-on-app-store/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iPhone Cocoa App development with JavaScript</title>
		<link>http://girliemac.com/blog/2009/12/05/iphone-cocoa-app-development-with-javascript/</link>
		<comments>http://girliemac.com/blog/2009/12/05/iphone-cocoa-app-development-with-javascript/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 22:01:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[App]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[SDK]]></category>

		<guid isPermaLink="false">http://girliemac.com/blog/?p=114</guid>
		<description><![CDATA[Hello, I have neglected my blog since September although there have been some blog-worthy events like N900 meetup (plus Droid experience and new Fennec demo. See the [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_jade" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fgirliemac.com%252Fblog%252F2009%252F12%252F05%252Fiphone-cocoa-app-development-with-javascript%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22%20iPhone%20Cocoa%20App%20development%20with%20JavaScript%22%20%7D);"></div>
<p>Hello, I have neglected my blog since September although there have been some blog-worthy events like <a href="http://tnkgrl.wordpress.com/2009/11/01/nokia-n900-meetup/" targtet="_blank">N900 meetup</a> (plus Droid experience and new Fennec demo. See the videos by Tnkgrl from the link!), California Data Camp, release of <a href="http://www.net2streams.net/" target="_blank">Net2Streams Pro</a> (the streaming radio app for Palm WebOS I helped writing) etc&#8230; Well, I keep microblogging on Twitter almost daily basis so <a href="http://twitter.com/girlie_mac" target="_blank">follow me</a> if you&#8217;d like!</p>
<p>One of the interesting I have been independently doing is that writing an app for iPhone with JavaScript, and this time, not an web app but a &#8220;native&#8221; Cocoa app. Yes I said a native iPhone app in JavaScript! But how? -I used this excellent open-source platform, called <strong>Titanium</strong> by <a href="http://www.appcelerator.com/" target="_blank">Appcelerator</a>! Without bothering Obj.C or Java, Titanium allows developers to write iPhone and Android apps with the familiar web technology.</></p>
<p>So, as a test run, I have created the iCuteoverload app for iPhone again. (Originally, I made the web app for iPhone, using <a href="http://code.google.com/p/iui/" target="_blank">iUI</a> in 2007)<br />
I will not release this app on AppStore -not because of the technical issue but the agreement with the business decision. (Yes, this app contents are not mine and copyrighted!) But I should be able to show the video capture as a demo to tell you what Titanium can do for web devs like me!</p>
<div align="center">
<object width="245" height="503"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7231908&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff0179&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=7231908&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff0179&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="245" height="503"></embed></object>
</div>

]]></content:encoded>
			<wfw:commentRss>http://girliemac.com/blog/2009/12/05/iphone-cocoa-app-development-with-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

