<?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>cssgallery.info</title>
	<atom:link href="http://cssgallery.info/feed/" rel="self" type="application/rss+xml" />
	<link>http://cssgallery.info</link>
	<description>Resources for web and mobile developers</description>
	<lastBuildDate>Tue, 20 Mar 2012 06:27:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>A fancy box with rounded corners and drop shadow with CSS3 only. Really?</title>
		<link>http://cssgallery.info/a-fancy-box-with-rounded-corners-and-drop-shadow-with-css3-only-really/</link>
		<comments>http://cssgallery.info/a-fancy-box-with-rounded-corners-and-drop-shadow-with-css3-only-really/#comments</comments>
		<pubDate>Tue, 20 Mar 2012 06:27:03 +0000</pubDate>
		<dc:creator>Lucica Ibanescu</dc:creator>
				<category><![CDATA[CSS & CSS3]]></category>
		<category><![CDATA[:after]]></category>
		<category><![CDATA[border-radius]]></category>
		<category><![CDATA[box-shadow]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[drop shadow]]></category>
		<category><![CDATA[gradents]]></category>
		<category><![CDATA[pseudo-elements]]></category>
		<category><![CDATA[rounded corners]]></category>
		<category><![CDATA[shadow]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=2228</guid>
		<description><![CDATA[I have to admit that when I like the design of a website I check its CSS and HTML to see the code hoping to learn something new. I'm horrible at design and I cannot make a box even if I have it in front of me for 24 hours non stop but I love all kinds of tricks to make the content more appealing: rounded boxes, sexy quote marks, bubbles, everything. 

What is really weird is that all these fancy design elements are usually cut as images and put as background-image for some DIV while the vast majority of them can be recreated with CSS. I admit, not all of them are simple but some do and today I'll show you my latest experiment. I love a certain kind of box and I'm trying to make it using CSS3 only. After a little prayer to the CSS3 God let's start. 

If you're not a patient person skip all this and <a href="http://cssgallery.info/wp-content/box/" title="3 ways of coding a fancy box with shadows using CSS3">go directly to the test page.</a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fa-fancy-box-with-rounded-corners-and-drop-shadow-with-css3-only-really%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fa-fancy-box-with-rounded-corners-and-drop-shadow-with-css3-only-really%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I have to admit that when I like the design of a website I check its CSS and HTML to see the code hoping to learn something new. I&#8217;m horrible at design and I cannot make a box even if I have it in front of me for 24 hours non stop but I love all kinds of tricks to make the content more appealing: rounded boxes, sexy quote marks, bubbles, everything. </p>
<p>What is really weird is that all these fancy design elements are usually cut as images and put as background-image for some DIV while the vast majority of them can be recreated with CSS. I admit, not all of them are simple but some do and today I&#8217;ll show you my latest experiment. I love a certain kind of box and I&#8217;m trying to make it using CSS3 only. After a little prayer to the CSS3 God let&#8217;s start. </p>
<p>If you&#8217;re not a patient person skip all this and <a href="http://cssgallery.info/wp-content/box/" title="3 ways of coding a fancy box with shadows using CSS3">go directly to the test page.</a></p>
<h2>Let&#8217;s pick an image and apply some CSS3 love</h2>
<p>I usually like these kind of boxes with rounded corners, some smooth gradient inside, maybe an inner shadow and definitely a drop shadow. Definitely! So here&#8217;s our guinea pig.<br />
<img src="http://cssgallery.info/wp-content/uploads/2012/03/box-with-rounded-corners-and-drop-shadow.png" alt="box with rounded corners and drop shadow" title="box with rounded corners and drop shadow" width="301" height="256" class="alignleft size-full wp-image-2229" style="box-shadow:none" /><br />
The problem with it is the drop shadow and I have a feeling that making it will be fun but seeing it in Internet Explorer will not.</p>
<p>The rounded corners and the gradient are piece of cake. With a little help from the <a href="http://www.colorzilla.com/gradient-editor/" title="Ultimate CSS Gradient Generator  A powerful Photoshop-like CSS gradient editor from ColorZilla.">Ultimate CSS Gradient Generator</a> the code looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#f5f5f5</span><span style="color: #00AA00;">;</span> 
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> -moz-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span>  <span style="color: #cc00cc;">#f5f5f5</span> <span style="color: #933;">0%</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#efefef</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* FF3.6+ */</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> -webkit-gradient<span style="color: #00AA00;">&#40;</span>linear<span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">,</span> color-stop<span style="color: #00AA00;">&#40;</span><span style="color: #933;">0%</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#f5f5f5</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> color-stop<span style="color: #00AA00;">&#40;</span><span style="color: #933;">100%</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#efefef</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Chrome,Safari4+ */</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> -webkit-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span>  <span style="color: #cc00cc;">#f5f5f5</span> <span style="color: #933;">0%</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#efefef</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Chrome10+,Safari5.1+ */</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> -o-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span>  <span style="color: #cc00cc;">#f5f5f5</span> <span style="color: #933;">0%</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#efefef</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Opera 11.10+ */</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> -ms-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span>  <span style="color: #cc00cc;">#f5f5f5</span> <span style="color: #933;">0%</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#efefef</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* IE10+ */</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span>  <span style="color: #cc00cc;">#f5f5f5</span> <span style="color: #933;">0%</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#efefef</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* W3C */</span>
-pie-<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span>  <span style="color: #cc00cc;">#f5f5f5</span> <span style="color: #933;">0%</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#efefef</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> 
border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">7px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#d8d8d8</span><span style="color: #00AA00;">;</span></pre></div></div>

<p>You noticed I used <a href="http://css3pie.com/" title="CSS PIE for CSS3 on Internet Explorer">CSS PIE</a> because I am really trying to make this work on Internet Explorer. There was also a grey border that we added.</p>
<p>The white inner border is an <strong>inner shadow</strong> actually, let&#8217;s create it:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #993333;">white</span> <span style="color: #993333;">inset</span><span style="color: #00AA00;">;</span></pre></div></div>

<p>The outside shadow is a bit tricky, we could add it to the inner shadow cause <strong>box-shadow property allow elements to have multiple shadows</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #993333;">white</span> <span style="color: #993333;">inset</span><span style="color: #00AA00;">,</span> <span style="color: #933;">0px</span> <span style="color: #933;">23px</span> <span style="color: #933;">21px</span> <span style="color: #933;">-33px</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span></pre></div></div>

<p><img src="http://cssgallery.info/wp-content/uploads/2012/03/old-school-CSS3-shadow.gif" alt="old school CSS3 shadow" title="old school CSS3 shadow" width="314" height="271" class="alignleft size-full wp-image-2238" style="box-shadow:none" /></p>
<p>The problem is that the shadow is not quite how the designer wanted it to be &#8211; and as you can see it for yourself it&#8217;s not even looking the same in all browsers (Internet Explorer simply killed it). It&#8217;s some sort of blurred copy of the box while our shadow is elliptical.</p>
<p><strong>Almost the same</strong> is not acceptable. And you, as programmer, really have to <a href="http://cssgallery.info/multibrowser-pixel-perfect-addon-for-horizontal-grid-designs/" title="Multibrowser Pixel-perfect addon for horizontal grid designs :)">make pixel-perfect websites</a>, right???</p>
<h2 class="cb">Using the :after pseudo element</h2>
<p>The idea is simple: we generate the box but when it comes to generating the shadow we just create an ellipse and apply the shadow to it. The ellipse stays behind the box (if we&#8217;re lucky) and its shadow drops under OUR fancy box.</p>
<p>I tried applying the :after element to our box directly and because it was really stubborn and did not want to go behind the box I had to create a wrapper and apply the shadow to it. The HTML is simple:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div class=&quot;wrapper&quot;&gt;&lt;div class=&quot;box&quot;&gt;&lt;/div&gt;&lt;/div&gt;</pre></div></div>

<p>The CSS is:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">.wrapper<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> 
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.wrapper</span><span style="color: #3333ff;">:after</span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">''</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">300px</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">90px</span><span style="color: #00AA00;">;</span>
        border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">50%</span><span style="color: #00AA00;">;</span>
        box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">20px</span> <span style="color: #933;">20px</span> <span style="color: #933;">-20px</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">164px</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">320px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The result is not bad.<br />
<img src="http://cssgallery.info/wp-content/uploads/2012/03/shadow-with-pseudo-elements.gif" alt="shadow with pseudo elements" title="shadow with pseudo elements" width="318" height="271" class="alignleft size-full wp-image-2246"  style="box-shadow:none"/></p>
<p>The problem is that the mix of :after pseudo element, CSS PIE and the box-shadow is fatal for Internet Explorer 7 and 8 while IE9 generates the box a bit different. </p>
<p>So <strong>no crossbrowser solution here</strong>.</p>
<h2 class="cb">What if we break the rule and use an image for shadow?</h2>
<p>We cut the shadow as image and use the :after pseudo element to position it. No wrapper needed this time and the CSS looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../img/shadow.png&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #000000; font-weight: bold;">bottom</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> 
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">299px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">584px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">''</span><span style="color: #00AA00;">;</span></pre></div></div>

<p>The box will look like the image because we actually hacked the shadow. I know, I&#8217;m ashamed but this time Internet Explorer finally behaves because IE8 supports pseudo elements. (IE7 not really)<br />
<img src="http://cssgallery.info/wp-content/uploads/2012/03/shadow-placed-as-image.gif" alt="shadow placed as image" title="shadow placed as image" width="308" height="273" class="alignleft size-full wp-image-2251" style="box-shadow:none" /></p>
<p>A crossbrowser solution? Not quite! </p>
<p>But if we <strong>isolate Internet Explorer 8 and 9</strong> and apply them the shadow-as-image solution, <strong>IE7 takes the shadow-as-image</strong> but no pseudo-elements and the rest (Mozilla, Chrome, Safari, Opera) the pure-CSS3-no-image solution then we have a deal! </p>
<p>I know it&#8217;s ugly but <strong>we save one HTTP request</strong> and <strong>do not load a 3Kb image for modern browsers</strong> and that is something! Multiply that with X boxes we usually use in a website and we have more than nothing there.</p>
<p>This is how Mozilla displays the boxes&#8230;</p>
<p><img src="http://cssgallery.info/wp-content/uploads/2012/03/mozilla-screenshot.gif" alt="mozilla screenshot" title="mozilla screenshot" width="629" height="547" class="alignnone size-full wp-image-2256" style="box-shadow:none" /></p>
<p>&#8230; but the fun part is this one: Internet Explorer 9 screenshots:<br />
<img src="http://cssgallery.info/wp-content/uploads/2012/03/IE9-screenshot.gif" alt="IE9 screenshot" title="IE9 screenshot" width="629" height="554" class="alignleft size-full wp-image-2275" /></p>
<div class="shr-publisher-2228"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fa-fancy-box-with-rounded-corners-and-drop-shadow-with-css3-only-really%2F' data-shr_title='A+fancy+box+with+rounded+corners+and+drop+shadow+with+CSS3+only.+Really%3F'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fa-fancy-box-with-rounded-corners-and-drop-shadow-with-css3-only-really%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fa-fancy-box-with-rounded-corners-and-drop-shadow-with-css3-only-really%2F' data-shr_title='A+fancy+box+with+rounded+corners+and+drop+shadow+with+CSS3+only.+Really%3F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><h3>Related posts:</h3><ol>
<li><a href='http://cssgallery.info/my-own-attempts-to-build-css3-patterns/' rel='bookmark' title='My own attempts to build CSS3 patterns'>My own attempts to build CSS3 patterns</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/a-fancy-box-with-rounded-corners-and-drop-shadow-with-css3-only-really/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dan&#8217;s presentation at Appcelerator Meetup @ Mobile World Congress 2012</title>
		<link>http://cssgallery.info/dans-presentation-at-appcelerator-meetup-mobile-world-congress-2012/</link>
		<comments>http://cssgallery.info/dans-presentation-at-appcelerator-meetup-mobile-world-congress-2012/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 11:04:30 +0000</pubDate>
		<dc:creator>Lucica Ibanescu</dc:creator>
				<category><![CDATA[Coffee break]]></category>
		<category><![CDATA[Learn Titanium Appcelerator]]></category>
		<category><![CDATA[Appcelerator Meetup]]></category>
		<category><![CDATA[Barcelona]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[Dan Tamas]]></category>
		<category><![CDATA[meetup]]></category>
		<category><![CDATA[Mobile World Congress 2012]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[speech]]></category>
		<category><![CDATA[titanium appcelerator]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=2188</guid>
		<description><![CDATA[Today I will try to talk about my experience as a freelancer that uses Titanium for all his mobile projects and how to build your career around the community.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fdans-presentation-at-appcelerator-meetup-mobile-world-congress-2012%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fdans-presentation-at-appcelerator-meetup-mobile-world-congress-2012%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I&#8217;m the most annoying person on Appc&#8217;s QA forum, my name is Dan and this is how I can be found:</p>
<p><strong>@dan_tamas<br />
<a href="http://dan-tamas.me" title="Dan Tamas website">http://dan-tamas.me</a><br />
</strong></p>
<p>Today I will try to talk about my experience as a freelancer that uses Titanium for all his mobile projects.</p>
<h2>The community</h2>
<p><img src="http://cssgallery.info/wp-content/uploads/2012/02/the-Appcelerator-community.jpg" alt="screenshot of the Appcelerator community website" title="the Appcelerator community" width="640" height="333" class="alignnone size-full wp-image-2191" /></p>
<p>This is the Appcelerator Community.  I&#8217;d like to tell you about what drives me to spend so much time on the QA. I love the open source movement and I think that helping other people will make us better and we&#8217;ll finally achieve <strong>world peace</strong>.</p>
<p>WRONG! This is wrong, but not as in lying but as in not telling the whole truth, just like marketing does <img src='http://cssgallery.info/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Let&#8217;s take a client. Kevin (Whinnery) looks like he knows some stuff about Appcelerator and he wants a cross-platform application. Somehow he finds my website.</p>
<p><img src="http://cssgallery.info/wp-content/uploads/2012/02/Dan-Tamas-portfolio.jpg" alt="Dan Tamas portfolio screenshot from his website" title="Dan Tamas portfolio" width="640" height="220" class="alignnone size-full wp-image-2192" /></p>
<p>A freelancer&#8217;s life is usually governed by NDAs. Everybody wants an NDA as if their project will be the next Angry Birds. When you reach a certain level and people start to know you, you begin to have better and more complex / interesting / nicer projects. But we all know how this usually happens. </p>
<p>The X (big) company hires a Marketing company to take care of their image, website and of course mobile apps. But they need programmers for this, so they hire a programming company. Well the story is that the programming company is nothing more than a few guys in-house and the rest  of the team is made by <strong>us</strong>, the freelancers. And as you suspected they will want an NDA, because they also have one from the Marketing company or they don&#8217;t want the world to know that somebody else did their job.</p>
<p>I can tell you that I have worked for 2 companies so big that everybody in this room heard about. But of course I cannot tell you who they are. You might believe me or not but Kevin, the client, surely won&#8217;t &#8211;  he needs something to see and not just simple words.</p>
<p>So coming back to my portfolio what does the client see? </p>
<p>Some certification &#8211; everybody has one &#8211; a boring FunyABC app for kids, MotorSport &#8211; an auto magazine for a German publication, some books and of course the biggest hit: <em>the divorce calculator</em>.</p>
<p>Nothing fancy, nothing outstanding. But because I&#8217;m pretty in the picture he gives me a chance and asks me for an interview.</p>
<h2>What can I come up with?</h2>
<p>I come up with this: <strong>I&#8217;m number 2 in the Top Experts</strong><br />
<img src="http://cssgallery.info/wp-content/uploads/2012/02/Appcelerator-top-experts.jpg" alt="Appcelerator top experts: Dan Tamas is second" title="Appcelerator top experts" width="576" height="290" class="alignnone size-full wp-image-2196" /></p>
<p>And this: <strong>I&#8217;m an Enterprise user</strong> of the framework with access to professional support, free modules and&#8230; free beer of course <img src='http://cssgallery.info/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
<img src="http://cssgallery.info/wp-content/uploads/2012/02/Dan-Tamas-profile-on-Appcelerator-website.jpg" alt="Dan Tamas profile on Appcelerator website" title="Dan Tamas profile on Appcelerator website" width="640" height="384" class="alignnone size-full wp-image-2197" /></p>
<p>And I start to explain to the client that I&#8217;m a Titan, that I was chosen &#8220;Titan of the month&#8221; back in September, that I wrote some tutorials and, starting tomorrow, that I was invited to speak to an event organized by Appcelerator itself.</p>
<p>At this point there are very few clients that will discard me as a candidate for their project. If he&#8217;s not looking for cheap work or unless some other Titan manages to impress him better &#8211; like Aaron or Matt or any other guy spending his time on the QA forum &#8211; I&#8217;m all set.</p>
<h2>How do you reach this level?</h2>
<ol>
<li>Spend some quality time on QA, giving answers to questions, but good answers.</li>
<li>Write articles and tutorials, people are searching for good Titanium tutorials.</li>
</ol>
<p>Appcelerator as company is a little different because they are really helping the community, despite what some people complain on the forum.  For example, most of the Titans have Pro accounts &#8211; for free &#8211; and the most active guys on QA are actually Appcelerator employees.</p>
<p>As you see, 1 hour &#8216;wasted&#8217; on QA every day starts to bring something back. </p>
<p>Also reading other people&#8217;s answers makes you a better programmer, you learn for free just by reading their posts. And we have the whole stuff about clients impressed by this, as I just told you.</p>
<h2>Bottom line</h2>
<p>So bottom line &#8211; as a freelancer, build your business around the community. That one hour a day spent helping other people will have the best ROI you ever saw.</p>
<h1 style="color:#f00;padding-bottom:10px">The Meetup in pictures</h1>
<h2>Meeting the Appcelerator guys</h2>
<p><img src="http://cssgallery.info/wp-content/uploads/2012/03/Kevin-Javier-Dan-AppceleratorMeetup-Barcelona-2012.jpg" alt="Kevin Javier and  Dan Tamas at Appcelerator Meetup Barcelona 2012" title="Kevin Javier and  Dan Tamas at Appcelerator Meetup Barcelona 2012" width="640" height="460" class="alignnone size-full wp-image-2221" /></p>
<p><img src="http://cssgallery.info/wp-content/uploads/2012/03/Kevin-Javier-Dan-AppceleratorMeetup-Barcelona2012.jpg" alt="Kevin Javier and  Dan Tamas at Appcelerator Meetup Barcelona 2012" title="Kevin Javier and  Dan Tamas at Appcelerator Meetup Barcelona 2012" width="640" height="458" class="alignnone size-full wp-image-2222" /></p>
<p><img src="http://cssgallery.info/wp-content/uploads/2012/03/Nolan-Jeff-Dan-AppceleratorMeetup-Barcelona-2012.jpg" alt="Nolan Jeff and  Dan Tamas at Appcelerator Meetup Barcelona 2012" title="Nolan Jeff and  Dan Tamas at Appcelerator Meetup Barcelona 2012" width="640" height="444" class="alignnone size-full wp-image-2223" /></p>
<h2>Dan Tamas speaking at Appcelerator Meetup Barcelona 2012</h2>
<p><img src="http://cssgallery.info/wp-content/uploads/2012/03/Dan-AppceleratorMeetup-Barcelona-2012.jpg" alt="Dan Tamas speaking at Appcelerator Meetup Barcelona 2012" title="Dan Tamas speaking at Appcelerator Meetup Barcelona 2012" width="640" height="396" class="alignnone size-full wp-image-2217" /></p>
<p><img src="http://cssgallery.info/wp-content/uploads/2012/03/Dan-AppceleratorMeetup-Barcelona2012.jpg" alt="Dan Tamas speaking at Appcelerator Meetup Barcelona 2012" title="Dan Tamas speaking at Appcelerator Meetup Barcelona 2012" width="640" height="451" class="alignnone size-full wp-image-2218" /></p>
<h2>Javier Rayon speaking at Appcelerator Meetup Barcelona 2012</h2>
<p><img src="http://cssgallery.info/wp-content/uploads/2012/03/Javier-AppceleratorMeetup-Barcelona-2012.jpg" alt="Javier Rayon speaking at Appcelerator Meetup Barcelona 2012" title="Javier Rayon speaking at Appcelerator Meetup Barcelona 2012" width="640" height="430" class="alignnone size-full wp-image-2219" /></p>
<p><img src="http://cssgallery.info/wp-content/uploads/2012/03/Javier-AppceleratorMeetup-Barcelona2012.jpg" alt="Javier Rayon speaking at Appcelerator Meetup Barcelona 2012" title="Javier Rayon speaking at Appcelerator Meetup Barcelona 2012" width="640" height="951" class="alignnone size-full wp-image-2220" /></p>
<div class="shr-publisher-2188"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fdans-presentation-at-appcelerator-meetup-mobile-world-congress-2012%2F' data-shr_title='Dan%27s+presentation+at+Appcelerator+Meetup+%40+Mobile+World+Congress+2012'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fdans-presentation-at-appcelerator-meetup-mobile-world-congress-2012%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fdans-presentation-at-appcelerator-meetup-mobile-world-congress-2012%2F' data-shr_title='Dan%27s+presentation+at+Appcelerator+Meetup+%40+Mobile+World+Congress+2012'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><h3>Related posts:</h3><ol>
<li><a href='http://cssgallery.info/dan-tamas-speaking-about-titanium-appcelerator-at-theevent-2011-caceres-spain/' rel='bookmark' title='Dan Tamas speaking about Titanium Appcelerator at TheEvent 2011, Cáceres, Spain'>Dan Tamas speaking about Titanium Appcelerator at TheEvent 2011, Cáceres, Spain</a></li>
<li><a href='http://cssgallery.info/qr-generator-module-for-titanium-appcelerator/' rel='bookmark' title='QR Generator module for Titanium Appcelerator'>QR Generator module for Titanium Appcelerator</a></li>
<li><a href='http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/' rel='bookmark' title='Create a countdown timer with Titanium Appcelerator'>Create a countdown timer with Titanium Appcelerator</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/dans-presentation-at-appcelerator-meetup-mobile-world-congress-2012/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>My own attempts to build CSS3 patterns</title>
		<link>http://cssgallery.info/my-own-attempts-to-build-css3-patterns/</link>
		<comments>http://cssgallery.info/my-own-attempts-to-build-css3-patterns/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 20:12:16 +0000</pubDate>
		<dc:creator>Lucica Ibanescu</dc:creator>
				<category><![CDATA[CSS & CSS3]]></category>
		<category><![CDATA[bio hazard]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[flowers]]></category>
		<category><![CDATA[gradient]]></category>
		<category><![CDATA[linear gradient]]></category>
		<category><![CDATA[pattersn]]></category>
		<category><![CDATA[radial gradient]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=2159</guid>
		<description><![CDATA[I was watching the other day the talk that <a href="http://lea.verou.me" title="Lea Verou website">Lea Verou</a> gave at Fronteers 2011  when she just proved that I don't know CSS3 at all. 

One thing caught my attention: <strong>CSS3 patterns</strong>. Making some of my own was the next step. It's a great way of learning the specs a bit better cause I must confess I never read them properly and never bothered with the small details. ]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fmy-own-attempts-to-build-css3-patterns%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fmy-own-attempts-to-build-css3-patterns%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I was watching the other day the talk that <a href="http://lea.verou.me" title="Lea Verou website">Lea Verou</a> gave at Fronteers 2011 (you can check the video on <a href="http://vimeo.com/fronteers/videos" title="Frontters 2010 and 2011  videos on Vimeo">Fronteers Vimeo page</a>) when she just proved that I don&#8217;t know CSS3 at all (I lived for a while with the sensation that I did know a little bit, I was wrong though). </p>
<p>One thing caught my attention: <strong>CSS3 patterns</strong>. She build some really crazy stuff there and I invite you to <a href="http://lea.verou.me/css3patterns/" title="CSS3 patterns">check more CSS3 patterns on her site</a>, test the code and implement it in your future projects. Nothing is made with images, just pure CSS3 gradients and lots of brains.</p>
<p>Here&#8217;s how some of them look like:</p>
<p><img src="http://cssgallery.info/wp-content/uploads/2012/02/CSS3patterns-by-Lea-Verou.jpg" alt="CSS3patterns by Lea Verou " title="CSS3patterns-by-Lea-Verou" width="650" height="389" class="alignnone size-full wp-image-2161" /></p>
<p>Making some of my own was the next step. It&#8217;s a great way of learning the specs a bit better cause I must confess I never read them properly and never bothered with the small details. </p>
<p>I did not have to build patterns before and I am almost certain I won&#8217;t have to do that in the near future but maybe you&#8217;ll have to and these small chunks of code will inspire you to build something and learn the tricks yourselves.</p>
<p>Here&#8217;s what I did:</p>
<h2>Violet flowers</h2>
<p><img src="http://cssgallery.info/wp-content/uploads/2012/02/violets.gif" alt="violets pattern" title="violets" width="612" height="315" class="alignnone size-full wp-image-2165" /></p>
<p>The code is quite simple actually, I wanted to make the flowers with radial gradient and choose some fancy gradient inside but I could not find the right colors so in the end the code looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span>
radial-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #993333;">circle</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#21052D</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#21052D</span> <span style="color: #933;">8px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">8px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">-14px</span> <span style="color: #933;">35px</span><span style="color: #00AA00;">,</span>
radial-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #993333;">circle</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#270A33</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#270A33</span> <span style="color: #933;">14px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">14px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">-3px</span> <span style="color: #933;">-30px</span><span style="color: #00AA00;">,</span>
radial-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #993333;">circle</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#270A33</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#270A33</span> <span style="color: #933;">14px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">14px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">-5px</span> <span style="color: #933;">25px</span><span style="color: #00AA00;">,</span>
radial-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #993333;">circle</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#270A33</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#270A33</span> <span style="color: #933;">14px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">14px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">-23px</span> <span style="color: #933;">-30px</span><span style="color: #00AA00;">,</span> 
radial-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #993333;">circle</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#270A33</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#270A33</span> <span style="color: #933;">14px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">14px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">-23px</span> <span style="color: #933;">-49px</span><span style="color: #00AA00;">;</span>
background-<span style="color: #000000; font-weight: bold;">size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">67px</span> <span style="color: #933;">75px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#20052B</span><span style="color: #00AA00;">;</span></pre></div></div>

<p><strong>Add the vendor prefixes yourselves</strong>. Adding all of them here myself would have cluttered the page and made your understanding of it quite impossible. It won&#8217;t work the way it is written right now, it needs the vendor-prefixes. (CSS PIE with radial gradient did not seem to work in older versions of IE but the page degrades to a nice solid violet color as a background which is still ok with me)</p>
<p>The cools stuff is that you can increase or decrease the size of the flowers just by multiplying the numbers in there. I mean all of them. Be aware that small flowers won&#8217;t display as well, browsers struggled a little displaying them half this size. </p>
<h2>Bio hazard</h2>
<p><img src="http://cssgallery.info/wp-content/uploads/2012/02/bio-hazard1.gif" alt="bio hazard CSS3 pattern" title="bio hazard" width="610" height="263" class="alignnone size-full wp-image-2174" /></p>
<p>This one is a bit more complex, a mix of radial and linear gradients so you&#8217;ll just have to take it as it is:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span>
radial-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #993333;">circle</span><span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">-25px</span> <span style="color: #933;">75px</span><span style="color: #00AA00;">,</span>
radial-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #993333;">circle</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">yellow</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">yellow</span> <span style="color: #933;">13px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">13px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">-25px</span> <span style="color: #933;">75px</span><span style="color: #00AA00;">,</span>
linear-gradient<span style="color: #00AA00;">&#40;</span>300deg<span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span>
linear-gradient<span style="color: #00AA00;">&#40;</span>60deg<span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span>
linear-gradient<span style="color: #00AA00;">&#40;</span>300deg<span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">42px</span> <span style="color: #933;">-25px</span><span style="color: #00AA00;">,</span>
linear-gradient<span style="color: #00AA00;">&#40;</span>60deg<span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">42px</span> <span style="color: #933;">25px</span><span style="color: #00AA00;">,</span>
linear-gradient<span style="color: #00AA00;">&#40;</span>300deg<span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">42px</span> <span style="color: #933;">25px</span><span style="color: #00AA00;">,</span>
linear-gradient<span style="color: #00AA00;">&#40;</span>60deg<span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">42px</span> <span style="color: #933;">-25px</span><span style="color: #00AA00;">,</span>
linear-gradient<span style="color: #00AA00;">&#40;</span>120deg<span style="color: #00AA00;">,</span> <span style="color: #993333;">yellow</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">86px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span>
linear-gradient<span style="color: #00AA00;">&#40;</span>240deg<span style="color: #00AA00;">,</span> <span style="color: #993333;">yellow</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">86px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span>
linear-gradient<span style="color: #00AA00;">&#40;</span>120deg<span style="color: #00AA00;">,</span> <span style="color: #993333;">yellow</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">43px</span> <span style="color: #933;">25px</span><span style="color: #00AA00;">,</span>
linear-gradient<span style="color: #00AA00;">&#40;</span>240deg<span style="color: #00AA00;">,</span> <span style="color: #993333;">yellow</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">43px</span> <span style="color: #933;">25px</span><span style="color: #00AA00;">,</span>
linear-gradient<span style="color: #00AA00;">&#40;</span>120deg<span style="color: #00AA00;">,</span> <span style="color: #993333;">yellow</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">43px</span> <span style="color: #933;">-25px</span><span style="color: #00AA00;">,</span>
linear-gradient<span style="color: #00AA00;">&#40;</span>240deg<span style="color: #00AA00;">,</span> <span style="color: #993333;">yellow</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">43px</span> <span style="color: #933;">-25px</span><span style="color: #00AA00;">,</span>
radial-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #993333;">circle</span><span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #933;">28px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">28px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">-10px</span> <span style="color: #933;">-49px</span><span style="color: #00AA00;">,</span>
radial-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #993333;">circle</span><span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #933;">28px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">28px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">-54px</span> <span style="color: #933;">75px</span><span style="color: #00AA00;">,</span>
radial-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #993333;">circle</span><span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">black</span> <span style="color: #933;">28px</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">transparent</span> <span style="color: #933;">28px</span><span style="color: #00AA00;">&#41;</span> <span style="color: #933;">-10px</span> <span style="color: #933;">49px</span><span style="color: #00AA00;">;</span>
background-<span style="color: #000000; font-weight: bold;">size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">135px</span> <span style="color: #933;">150px</span><span style="color: #00AA00;">;</span> 
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">yellow</span><span style="color: #00AA00;">;</span></pre></div></div>

<p>As same as with the flowers, add the vendor prefixes to make it work in your browsers, scale it if you need to and yes, CSS PIE won&#8217;t work. Sorry about that.</p>
<p>I wonder if somebody will have the time to do a Christmas tree with bubbles <img src='http://cssgallery.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="shr-publisher-2159"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fmy-own-attempts-to-build-css3-patterns%2F' data-shr_title='My+own+attempts+to+build+CSS3+patterns'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fmy-own-attempts-to-build-css3-patterns%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fmy-own-attempts-to-build-css3-patterns%2F' data-shr_title='My+own+attempts+to+build+CSS3+patterns'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/my-own-attempts-to-build-css3-patterns/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>QR Generator module for Titanium Appcelerator</title>
		<link>http://cssgallery.info/qr-generator-module-for-titanium-appcelerator/</link>
		<comments>http://cssgallery.info/qr-generator-module-for-titanium-appcelerator/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 08:34:02 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Learn Titanium Appcelerator]]></category>
		<category><![CDATA[generate QR codes]]></category>
		<category><![CDATA[QR codes]]></category>
		<category><![CDATA[titanium appcelerator]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=2113</guid>
		<description><![CDATA[After Appcelerator launched the Marketplace I managed to create and post an iOs only module that is able to <strong>create QR codes directly on the  device</strong> without using an online service.

It can generate <strong>all types of codes</strong> (from 1 to 40) and with <strong>any level of correction</strong> (L, M, Q, H). You can also <strong>customize the size of the resulting QR code</strong> and it will try to adapt itself to this size to remain perfectly sharp and fully visible.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fqr-generator-module-for-titanium-appcelerator%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fqr-generator-module-for-titanium-appcelerator%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>After Appcelerator launched the Marketplace I managed to create and post an iOs only module that is able to <strong>create QR codes directly on the device</strong> without using an online service.</p>
<p>It can generate <strong>all types of codes</strong> (from 1 to 40) and with <strong>any level of correction</strong> (L, M, Q, H). You can also <strong>customize the size of the resulting QR code</strong> and it will try to adapt itself to this size to remain perfectly sharp and fully visible.</p>
<p>For now it&#8217;s able to generate these types of content:</p>
<ul>
<li>pure text</li>
<li>SMS (phone number, message)</li>
<li>phonecall (phone number)</li>
<li>email ( to, subject, message)</li>
<li>geo (lat, lon)</li>
<li>url</li>
</ul>
<p>You can buy it from the Marketplace: <a href="https://marketplace.appcelerator.com/apps/873" title="QR Generator module for Titanium Appcelerator" target="_blank">QR Generator module</a>.</p>
<div class="shr-publisher-2113"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fqr-generator-module-for-titanium-appcelerator%2F' data-shr_title='QR+Generator+module+for+Titanium+Appcelerator'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fqr-generator-module-for-titanium-appcelerator%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fqr-generator-module-for-titanium-appcelerator%2F' data-shr_title='QR+Generator+module+for+Titanium+Appcelerator'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><h3>Related posts:</h3><ol>
<li><a href='http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/' rel='bookmark' title='Create a countdown timer with Titanium Appcelerator'>Create a countdown timer with Titanium Appcelerator</a></li>
<li><a href='http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/' rel='bookmark' title='Making a combo-box in Titanium Appcelerator &#8211; code and video'>Making a combo-box in Titanium Appcelerator &#8211; code and video</a></li>
<li><a href='http://cssgallery.info/seven-days-with-titanium-day-7-orientation-and-accelerometer/' rel='bookmark' title='Seven days with Titanium &#8211; day 7 &#8211; orientation and accelerometer'>Seven days with Titanium &#8211; day 7 &#8211; orientation and accelerometer</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/qr-generator-module-for-titanium-appcelerator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seven days with Titanium &#8211; day 7 &#8211; orientation and accelerometer</title>
		<link>http://cssgallery.info/seven-days-with-titanium-day-7-orientation-and-accelerometer/</link>
		<comments>http://cssgallery.info/seven-days-with-titanium-day-7-orientation-and-accelerometer/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 20:29:22 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Learn Titanium Appcelerator]]></category>
		<category><![CDATA[accelerometer]]></category>
		<category><![CDATA[orientation]]></category>
		<category><![CDATA[Ti.Accelerometer]]></category>
		<category><![CDATA[Ti.Gesture]]></category>
		<category><![CDATA[Ti.UI.FACE_DOWN]]></category>
		<category><![CDATA[Ti.UI.FACE_UP]]></category>
		<category><![CDATA[Ti.UI.LANDSCAPE_LEFT]]></category>
		<category><![CDATA[Ti.UI.LANDSCAPE_RIGHT]]></category>
		<category><![CDATA[Ti.UI.PORTRAIT]]></category>
		<category><![CDATA[Ti.UI.UNKNOWN]]></category>
		<category><![CDATA[Ti.UI.UPSIDE_PORTRAIT]]></category>
		<category><![CDATA[titanium appcelerator]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=2117</guid>
		<description><![CDATA[Most of the devices nowadays are equipped with an accelerometer that detect the orientation of the device or the movements the user is doing with it. 

Titanium exposes this functionality through its APIs so let's take advantage of that :)]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fseven-days-with-titanium-day-7-orientation-and-accelerometer%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fseven-days-with-titanium-day-7-orientation-and-accelerometer%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Most of the devices nowadays are equipped with an accelerometer that detect the orientation of the device or the movements the user is doing with it. </p>
<p>Titanium exposes this functionality through its APIs so let&#8217;s take advantage of that <img src='http://cssgallery.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>The orientation</h2>
<p>The device can report <strong>7 states of the orientation</strong>  and they are defined in Titanium as follows:</p>
<ul>
<li>Ti.UI.UNKNOWN &#8211; the app cannot detect the position</li>
<li>Ti.UI.PORTRAIT</li>
<li>Ti.UI.UPSIDE_PORTRAIT</li>
<li>Ti.UI.LANDSCAPE_LEFT</li>
<li>Ti.UI.LANDSCAPE_RIGHT</li>
<li>Ti.UI.FACE_DOWN &#8211; like resting on a table with the screen downward</li>
<li>Ti.UI.FACE_UP &#8211; like resting on a table but with the screen upward</li>
</ul>
<p>While we have all this constants defined there are situations where <strong>they might not be available</strong>: in iOs when the user locks the orientation <strong>the device will report <u>that</u> orientation</strong> no matter how the device is held. On Android <strong>many devices can detect only the PORTRAIT and LANDSCAPE_LEFT orientations</strong>.</p>
<p>Since version 1.7.2 of the SDK the orientation API changed and is set per window (or activity). You can do this using the property <strong>orientationModes</strong> that accepts an array with the allowed orientation for that window. <a href="http://developer.appcelerator.com/blog/2011/07/android-window-orientation-behavior-change-for-1-7-2.html" title="Appcelerator orientation" target="_blank">See this post on Appcelerator&#8217;s blog</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">win.<span style="color: #660066;">orientationModes</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>Ti.<span style="color: #660066;">UI</span>.<span style="color: #660066;">PORTRAIT</span><span style="color: #339933;">,</span> Ti.<span style="color: #660066;">UI</span>.<span style="color: #660066;">LANDSCAPE_RIGHT</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div>

<p>There is also an event that triggers when the orientation changes allowing you to make the changes you might need (adapt the UI to the new orientation for example.)</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">Ti.<span style="color: #660066;">Gesture</span>.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'orientationchange'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>e.<span style="color: #660066;">orientation</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The alert <strong>will show a number from 1 to 7</strong> because the constants defined above are type INT. A good practice is to compare the orientation reported by the event with the constant and not directly with the number. In case something will change in the future this will assure you that the code will keep working.</p>
<p>You can find more about it in the docs page for <a href="http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Gesture-module" title="Titanium Gesture APIs" target="_blank">Titanium.Gesture</a></p>
<h2>The accelerometer</h2>
<p>The accelerometer is a piece of hardware that <strong>is giving you the current position of the device in a 3D coordinates</strong> (x, y and z) vector. This can allow you for example to control the movements of an element on the screen.</p>
<p>To get this vector all you have to do is to <strong>catch the update event</strong> of the <a href="http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Accelerometer-module" title="Titanium Accelerometer" target="_blank">Titanium.Accelerometer APIs</a>. It will return the vector we were talking about.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">Ti.<span style="color: #660066;">Accelerometer</span>.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'update'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    lbl.<span style="color: #660066;">text</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'x: '</span> <span style="color: #339933;">+</span> e.<span style="color: #660066;">x</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'y:'</span> <span style="color: #339933;">+</span> e.<span style="color: #660066;">y</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'z:'</span> <span style="color: #339933;">+</span> e.<span style="color: #660066;">z</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Again, <strong>it&#8217;s a good practice to remove the event when we don&#8217;t need it anymore</strong> to save some CPU cycles <img src='http://cssgallery.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Well, that&#8217;s it for Day 7. Code strong!</p>
<div class="shr-publisher-2117"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fseven-days-with-titanium-day-7-orientation-and-accelerometer%2F' data-shr_title='Seven+days+with+Titanium+-+day+7+-+orientation+and+accelerometer'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fseven-days-with-titanium-day-7-orientation-and-accelerometer%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fseven-days-with-titanium-day-7-orientation-and-accelerometer%2F' data-shr_title='Seven+days+with+Titanium+-+day+7+-+orientation+and+accelerometer'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><h3>Related posts:</h3><ol>
<li><a href='http://cssgallery.info/seven-days-with-titanium-day-0-introduction/' rel='bookmark' title='Seven days with Titanium &#8211; day 0 &#8211; introduction'>Seven days with Titanium &#8211; day 0 &#8211; introduction</a></li>
<li><a href='http://cssgallery.info/seven-days-with-titanium-day-2-tables-and-pickers/' rel='bookmark' title='Seven days with Titanium – day 2 &#8211; tables and pickers'>Seven days with Titanium – day 2 &#8211; tables and pickers</a></li>
<li><a href='http://cssgallery.info/seven-days-with-titanium-day-6%e2%80%93animations-and-transforms/' rel='bookmark' title='Seven days with Titanium – day 6 – animations and transforms'>Seven days with Titanium – day 6 – animations and transforms</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/seven-days-with-titanium-day-7-orientation-and-accelerometer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Insights from the Titanium App Developer certification exam</title>
		<link>http://cssgallery.info/insights-from-the-titanium-app-developer-certification-exam/</link>
		<comments>http://cssgallery.info/insights-from-the-titanium-app-developer-certification-exam/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 18:51:51 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Learn Titanium Appcelerator]]></category>
		<category><![CDATA[Appcelerator]]></category>
		<category><![CDATA[certification]]></category>
		<category><![CDATA[exam]]></category>
		<category><![CDATA[TCAD]]></category>
		<category><![CDATA[titanium]]></category>
		<category><![CDATA[Titanium Appcelerator TCAD exam certification]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=2097</guid>
		<description><![CDATA[Recently I became a Titanium Certified Application Developer (TCAD) and I was thinking on giving some insights on the exam for those who want to take it.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Finsights-from-the-titanium-app-developer-certification-exam%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Finsights-from-the-titanium-app-developer-certification-exam%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><img src="http://cssgallery.info/wp-content/uploads/2011/09/tcad_tab_small-1.png" alt="" title="TCAD" width="83" height="100" class="alignleft size-full wp-image-2098" /></p>
<p>Recently I became a Titanium Certified Application Developer (TCAD) and I was thinking on giving some insights on the exam for those who want to take it.</p>
<p>The exam covers all the areas that exists in the process of developing an app with Titanium Appcelerator:</p>
<ul>
<li>Code Questions,</li>
<li>Contacts and Social APIs,</li>
<li>Cross-Platform Development in Titanium,</li>
<li>Integrating Web Content,</li>
<li>Media and the Filesystem,</li>
<li>Using Location Services,</li>
<li>Working with Local Data,</li>
<li>Working With Remote Data,</li>
<li>You&#8217;re a Native Application Developer Now,</li>
<li>Zero To App Recap,</li>
<li>UI Fundamentals,</li>
<li>Deployment and Distribution.</li>
</ul>
<p>To pass the exam you will need of course experience but the Appcelerator team has put online at <a title="TCAD Course Lab" href="http://wiki.appcelerator.org/display/td/TCAD+Course+Labs" target="_blank">Wiki</a> the <strong>labs for each part of the exam</strong>. I strongly suggest you to <strong>take a good look at them</strong>, even at those that might look already known to you, because you might find some nice stuff inside and it will also remind you forgotten stuff at least.</p>
<p><strong>Some of the courses have videos</strong> and also links to the downloadable projects.</p>
<p>The projects are a good point to start/learn how to do things &#8220;the right way&#8221; and explain pretty well some principles that apply to an Appcelerator app.</p>
<p>Don&#8217;t let the word &#8220;exam&#8221; scare you because it&#8217;s not really difficult &#8211; some of the questions are simple and common sense. </p>
<p>So go for it!</p>
<div class="shr-publisher-2097"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fcssgallery.info%2Finsights-from-the-titanium-app-developer-certification-exam%2F' data-shr_title='Insights+from+the+Titanium+App+Developer+certification+exam'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fcssgallery.info%2Finsights-from-the-titanium-app-developer-certification-exam%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fcssgallery.info%2Finsights-from-the-titanium-app-developer-certification-exam%2F' data-shr_title='Insights+from+the+Titanium+App+Developer+certification+exam'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><h3>Related posts:</h3><ol>
<li><a href='http://cssgallery.info/seven-days-with-titanium-day-0-introduction/' rel='bookmark' title='Seven days with Titanium &#8211; day 0 &#8211; introduction'>Seven days with Titanium &#8211; day 0 &#8211; introduction</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/insights-from-the-titanium-app-developer-certification-exam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Possible new CSS features from Adobe</title>
		<link>http://cssgallery.info/possible-new-css-features-from-adobe/</link>
		<comments>http://cssgallery.info/possible-new-css-features-from-adobe/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 15:43:04 +0000</pubDate>
		<dc:creator>Lucica Ibanescu</dc:creator>
				<category><![CDATA[CSS & CSS3]]></category>
		<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[accessible]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS Exclusions]]></category>
		<category><![CDATA[CSS Regions]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[draft]]></category>
		<category><![CDATA[features]]></category>
		<category><![CDATA[flow]]></category>
		<category><![CDATA[multi column layout]]></category>
		<category><![CDATA[pie charts]]></category>
		<category><![CDATA[proposal]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=2070</guid>
		<description><![CDATA[Inspired from the print world people from Adobe and Microsoft are coming with <strong>new features</strong> that might (or might not) be embedded into future CSS specs. These new features - <a href="http://dev.w3.org/csswg/css3-regions/" title="CSS Regions proposal">CSS Regions</a> and <a href="http://dev.w3.org/csswg/css3-exclusions/" title="CSS exclusions draft">CSS Exclusions</a> - will <strong>allow text to flow into webpages pretty much like they do in newspapers</strong> and magazines. ]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fpossible-new-css-features-from-adobe%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fpossible-new-css-features-from-adobe%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Inspired from the print world, people from Adobe and Microsoft are coming with <strong>new features</strong> that might (or might not) be embedded into future CSS specs. These new features &#8211; <a href="http://dev.w3.org/csswg/css3-regions/" title="CSS Regions proposal">CSS Regions</a> and <a href="http://dev.w3.org/csswg/css3-exclusions/" title="CSS exclusions draft">CSS Exclusions</a> &#8211; will <strong>allow text to flow into webpages pretty much like they do in newspapers</strong> and magazines. </p>
<p>You remember that the idea of text flowing into columns is another CSS3 proposal, <a href="http://www.w3.org/TR/2011/CR-css3-multicol-20110412/" title="CSS multi-column layout">CSS Multi-column Layout Module</a> and web layouts imitating magazine layouts is <a href="http://www.w3.org/TR/css3-page/" title="CSS3 paged media module">CSS3 Paged Media Module</a></p>
<p>Let&#8217;s see some <a href="http://labs.adobe.com/downloads/cssregions.html" title="CSS regions and exclusions implemented by Adobe">examples that Adobe implemented</a>:</p>
<h2>Content threads and shapes using CSS regions</h2>
<p>Text could easily <strong>flow from one region to the other</strong> and we can also choose to imbricate regions or give them different widths, heights and positions in the layout (see picture below)</p>
<p><img src="http://cssgallery.info/wp-content/uploads/2011/07/multiple-content-threads.jpg" alt="multiple content threads with CSS regions" title="multiple content threads with CSS regions" width="568" height="272" class="alignnone size-full wp-image-2071" /><br />
<img src="http://cssgallery.info/wp-content/uploads/2011/07/capture-2.png" alt="content shaped like a heart with CSS regions" title="content shaped like a heart with CSS regions" width="229" height="216" class="alignleft size-full wp-image-2073" style="box-shadow:none !important"/><br />
If you can set rectangular regions, why not come up with weird <strong>custom shapes</strong>?</p>
<p>Text will also flow from one region (shape in this case) to another.</p>
<p>The idea is super-cool and we waited for it for a while now, but <strong>I do wonder about its usability</strong> if we think about the way people are reading web content versus printed text (that might change the bottom-top L shaped reading order observed with eye tracking methods).</p>
<h2>Content exclusion</h2>
<p><img src="http://cssgallery.info/wp-content/uploads/2011/07/text-exclusion.gif" alt="text exclusion with CSS" title="text exclusion with CSS" width="500" height="226" class="alignleft size-full wp-image-2075"  style="box-shadow:none !important"/><br />
The opposite idea is to <strong>exclude text from a certain region</strong> or regions. (rectangular or custom shape)</p>
<h2 style="clear:both">Possible real world implementations</h2>
<p><img src="http://cssgallery.info/wp-content/uploads/2011/07/adaptive-design.jpg" alt="adaptive design" title="adaptive design" width="363" height="355" class="alignleft size-full wp-image-2083" /><br />
Adobe came up with <a href="http://labs.adobe.com/downloads/cssregions.html" title="Complex CSS examples from Adobe">more complex examples</a> (they work in their own version of WebKit based browser only since these features are still a draft and highly experimental). </p>
<p>Text can flow into custom shape areas and that <strong>will allow us create CSS accessible pie charts</strong> and <strong>complex layouts involving images and text</strong> that will behave well on devices with <strong>different screen sizes and resolutions</strong>.</p>
<h2 class="cb" style="color:#f00">Update: Stephen Hay talking about these features at Fronteers 2011</h2>
<p><iframe src="http://player.vimeo.com/video/32126964?title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff" width="580" height="370" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<p><a href="http://vimeo.com/32126964">Stephen Hay | Go with the flow | Fronteers 2011</a> from <a href="http://vimeo.com/fronteers">Fronteers</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>In this session, Stephen will introduce, discuss and give examples of CSS3 Regions.</p>
<p>
Browsers have begun to introduce actual layout mechanisms like Flexible Box Layout and Grid/Template Layout. For this, we kneel humbly and are thankful. But while we&#8217;re at it, why settle for rudimentary layout tools when we can add content flow to the mix? CSS Regions attempts to bring the power of content flow from print to the Web. Think of Regions as Multi-column layout on adrenaline. Regions can be extremely powerful and useful on their own. When combined with other CSS3 modules they will give web designers and developers creative freedom which rivals that of printed media.</p>
<div class="shr-publisher-2070"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fpossible-new-css-features-from-adobe%2F' data-shr_title='Possible+new+CSS+features+from+Adobe'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fpossible-new-css-features-from-adobe%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fpossible-new-css-features-from-adobe%2F' data-shr_title='Possible+new+CSS+features+from+Adobe'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/possible-new-css-features-from-adobe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dan Tamas speaking about Titanium Appcelerator at TheEvent 2011, Cáceres, Spain</title>
		<link>http://cssgallery.info/dan-tamas-speaking-about-titanium-appcelerator-at-theevent-2011-caceres-spain/</link>
		<comments>http://cssgallery.info/dan-tamas-speaking-about-titanium-appcelerator-at-theevent-2011-caceres-spain/#comments</comments>
		<pubDate>Mon, 30 May 2011 16:08:44 +0000</pubDate>
		<dc:creator>Lucica Ibanescu</dc:creator>
				<category><![CDATA[Learn Titanium Appcelerator]]></category>
		<category><![CDATA[caceres]]></category>
		<category><![CDATA[Dan Tamas]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[introduction]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[slides]]></category>
		<category><![CDATA[spain]]></category>
		<category><![CDATA[spanish]]></category>
		<category><![CDATA[Theevnt2011]]></category>
		<category><![CDATA[titanium appcelerator]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=2060</guid>
		<description><![CDATA[Dan Tamas was invited to talk about Titanium Appcelerator at <a href="http://2011.theevnt.com/">TheEvnt 2011</a> in Cáceres, Spain, May 14th and the purpose of this talk was to <strong>present the advantages of using this framework to develop applications</strong> for iPhone, iPad and Android devices. 

It was an <strong>introductory talk</strong> in order to present to the Spanish developers an alternative to ObjectiveC and the very popular Java.

<div style="width:625px" id="__ss_8222580"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/dan_tamas/introduccion-en-titanium-appcelerator-dan-tamas-theevnt2011" title="Introduccion en Titanium Appcelerator - Dan Tamas #theEvnt2011">Introduccion en Titanium Appcelerator - Dan Tamas #theEvnt2011</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/8222580" width="625" height="455" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> <div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/dan_tamas">dan_tamas</a> </div> </div>


]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fdan-tamas-speaking-about-titanium-appcelerator-at-theevent-2011-caceres-spain%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fdan-tamas-speaking-about-titanium-appcelerator-at-theevent-2011-caceres-spain%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://dan-tamas.me/">Dan Tamas</a> was invited to talk about Titanium Appcelerator at <a href="http://2011.theevnt.com/">TheEvnt 2011</a> in Cáceres, Spain, May 14th and the purpose of this talk was to <strong>present the advantages of using this framework to develop applications</strong> for iPhone, iPad and Android devices. </p>
<p>It was an <strong>introductory talk</strong> in order to present to the Spanish developers an alternative to ObjectiveC and the very popular Java.</p>
<div style="width:625px" id="__ss_8222580"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/dan_tamas/introduccion-en-titanium-appcelerator-dan-tamas-theevnt2011" title="Introduccion en Titanium Appcelerator - Dan Tamas #theEvnt2011">Introduccion en Titanium Appcelerator &#8211; Dan Tamas #theEvnt2011</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/8222580" width="625" height="455" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
<div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/dan_tamas">dan_tamas</a> </div>
</p></div>
<p>For now I can only embed the slides (in Spanish) but I promise I will soon try to give you a link to the HTML version and also embed the video of the presentation. </p>
<div class="shr-publisher-2060"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fdan-tamas-speaking-about-titanium-appcelerator-at-theevent-2011-caceres-spain%2F' data-shr_title='Dan+Tamas+speaking+about+Titanium+Appcelerator+at+TheEvent+2011%2C+C%C3%A1ceres%2C+Spain'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fdan-tamas-speaking-about-titanium-appcelerator-at-theevent-2011-caceres-spain%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fdan-tamas-speaking-about-titanium-appcelerator-at-theevent-2011-caceres-spain%2F' data-shr_title='Dan+Tamas+speaking+about+Titanium+Appcelerator+at+TheEvent+2011%2C+C%C3%A1ceres%2C+Spain'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><h3>Related posts:</h3><ol>
<li><a href='http://cssgallery.info/dans-presentation-at-appcelerator-meetup-mobile-world-congress-2012/' rel='bookmark' title='Dan&#8217;s presentation at Appcelerator Meetup @ Mobile World Congress 2012'>Dan&#8217;s presentation at Appcelerator Meetup @ Mobile World Congress 2012</a></li>
<li><a href='http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/' rel='bookmark' title='Making a combo-box in Titanium Appcelerator &#8211; code and video'>Making a combo-box in Titanium Appcelerator &#8211; code and video</a></li>
<li><a href='http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/' rel='bookmark' title='Create a countdown timer with Titanium Appcelerator'>Create a countdown timer with Titanium Appcelerator</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/dan-tamas-speaking-about-titanium-appcelerator-at-theevent-2011-caceres-spain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advanced Titanium Tutorial &#8211; Bonjour Networking</title>
		<link>http://cssgallery.info/advanced-titanium-tutorial-bonjour-networking/</link>
		<comments>http://cssgallery.info/advanced-titanium-tutorial-bonjour-networking/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 10:33:51 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Learn Titanium Appcelerator]]></category>
		<category><![CDATA[Bonjour]]></category>
		<category><![CDATA[Bonjour Networking]]></category>
		<category><![CDATA[connection.start()]]></category>
		<category><![CDATA[serviceBrowser]]></category>
		<category><![CDATA[titanium appcelerator]]></category>
		<category><![CDATA[Titanium Networking]]></category>
		<category><![CDATA[updatedServices event]]></category>
		<category><![CDATA[ZeroConf]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=2017</guid>
		<description><![CDATA[Titanium Appcelerator Mobile has implemented for iOs the Bonjour (or ZeroConf if you want) network protocol that <strong>allows you to connect to another device</strong> found in the same network.

Before starting with the boring part - I mean the code - let's watch a video with a small demo showing 3 devices playing together :)

<h2>Networking with Titanium Mobile on iOs</h2>
<iframe title="YouTube video player" width="640" height="480" src="http://www.youtube.com/embed/CajPO9sBfU4?rel=0" frameborder="0" allowfullscreen></iframe>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fadvanced-titanium-tutorial-bonjour-networking%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fadvanced-titanium-tutorial-bonjour-networking%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Titanium Appcelerator Mobile has implemented for iOs the Bonjour (or ZeroConf if you want) network protocol that <strong>allows you to connect to another device</strong> found in the same network.</p>
<p>Before starting with the boring part &#8211; I mean the code &#8211; let&#8217;s watch a video with a small demo showing 3 devices playing together <img src='http://cssgallery.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Networking with Titanium Mobile on iOs</h2>
<p><iframe title="YouTube video player" width="640" height="480" src="http://www.youtube.com/embed/CajPO9sBfU4?rel=0" frameborder="0" allowfullscreen></iframe></p>
<p>I would like to mention that the iPod is a second generation one &#8211;  so less capable (the delays are visible in the video) and somehow, sometimes, even seems to loose packets. I tested the same app with an iPad instead of the iPod and everything works just fine.<br />
 <img src="http://cssgallery.info/wp-content/uploads/2011/02/bonjour-experiment1.png" alt="bubbles" title="bonjour experiment" width="158" height="372" class="alignright size-full wp-image-2041" style="margin:0px;border:none;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;"/></p>
<h2>Bonjour</h2>
<p>Based on the code found in <a href="https://github.com/appcelerator/titanium_mobile/blob/master/demos/KitchenSink/Resources/examples/bonjour.js">KitchenSink</a> I created a small function that creates the connection for us and returns an object to allow you to start it, close it and write to the socket.</p>
<p>Bonjour is a little weird to understand for those with less experience but shortly, things are like this:</p>
<ul>
<li><strong>We need a socket</strong> in read-write mode that will be used by a  localService  to publish its presence.</li>
<li>Each localService have to have <strong>its own unique name</strong> to be able to identify it in the network.</li>
</ul>
<p>Besides this, we need a <strong>serviceBrowser</strong> to find other devices around (that published their presence, of course).</p>
<p>Since everything is asynchronous we&#8217;ll have to rely on events to capture the data sent by somebody or the changes in the number of devices connected.</p>
<p>The serviceBrowser has the <strong>updatedServices event</strong> where we can capture the published services. Here in this function <strong>we&#8217;ll try to catch the read event</strong> for each service that is the one who tells us what data is sent over the network.</p>
<p><strong>Warning:</strong> Close the network connection the moment you don&#8217;t need it anymore.</p>
<h2>The Network Connection Function</h2>
<p>The function I created takes care of this so you will just have to use it as in the example below:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">Titanium.<span style="color: #660066;">include</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'bj.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> connection <span style="color: #339933;">=</span> bjnet<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'my_unique_name'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> json_data <span style="color: #339933;">=</span> JSON.<span style="color: #660066;">parse</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #006600; font-style: italic;">//do something with this data;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
connection.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>In other point of your app, where you want to send over a message, just do:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">	connection.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'my_message'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>As I said before, don&#8217;t forget to clean everything:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">win.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'close'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	connection.<span style="color: #000066;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h2>What is going on in the demo?</h2>
<p>The example in the video is pretty simple. Depending on what blob you touch (red, green or blue)  you create a new connection with this name and start it. At this moment any message coming from the network is JSON parsed and a small blob is created with the specified coordinates and color.</p>
<p>On your turn, when you touch the screen you send over the network your coordinates and color so the other devices know what to draw. <strong>Every message is a JSON stringified object</strong> like the one below:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">	<span style="color: #009900;">&#123;</span>coords<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>x<span style="color: #339933;">:</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span>y<span style="color: #339933;">:</span><span style="color: #CC0000;">200</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>player<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span><span style="color: #000066;">name</span><span style="color: #339933;">:</span><span style="color: #3366CC;">'red'</span><span style="color: #339933;">,</span> color<span style="color: #339933;">:</span><span style="color: #3366CC;">'#f00'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span></pre></div></div>

<p>As an aside <strong>the demo uses zero images</strong>. None. Everything is native and I plan a future tutorial on how to do this <img src='http://cssgallery.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>The code</h2>
<p>The code is hosted on <a href="https://github.com/rborn/Advanced-Titanium-Tutorial---Bonjour-Networking">Github</a> and you can <a href="https://github.com/rborn/Advanced-Titanium-Tutorial---Bonjour-Networking">download it from here</a>. <strong>Everything is MIT licensed</strong> but I&#8217;d like to hear what you come up with.</p>
<p>Code strong! </p>
<p><strong>PS.</strong> I&#8217;m allowed to say this cause I&#8217;m a titan <img src='http://cssgallery.info/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><strong class="spanish">Check the Spanish version of this post:<br />
 <a href="http://nosoloweb.es/tutorial-avanzado-de-titanium-bonjour-networking/" rel="me">Tutorial Avanzado de Titanium – Bonjour Networking</a></strong></p>
<div class="shr-publisher-2017"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fadvanced-titanium-tutorial-bonjour-networking%2F' data-shr_title='Advanced+Titanium+Tutorial+-+Bonjour+Networking'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fadvanced-titanium-tutorial-bonjour-networking%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fadvanced-titanium-tutorial-bonjour-networking%2F' data-shr_title='Advanced+Titanium+Tutorial+-+Bonjour+Networking'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><h3>Related posts:</h3><ol>
<li><a href='http://cssgallery.info/seven-days-with-titanium-day-2-tables-and-pickers/' rel='bookmark' title='Seven days with Titanium – day 2 &#8211; tables and pickers'>Seven days with Titanium – day 2 &#8211; tables and pickers</a></li>
<li><a href='http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/' rel='bookmark' title='Create a countdown timer with Titanium Appcelerator'>Create a countdown timer with Titanium Appcelerator</a></li>
<li><a href='http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/' rel='bookmark' title='Making a combo-box in Titanium Appcelerator &#8211; code and video'>Making a combo-box in Titanium Appcelerator &#8211; code and video</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/advanced-titanium-tutorial-bonjour-networking/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Seven days with Titanium – day 6 – animations and transforms</title>
		<link>http://cssgallery.info/seven-days-with-titanium-day-6%e2%80%93animations-and-transforms/</link>
		<comments>http://cssgallery.info/seven-days-with-titanium-day-6%e2%80%93animations-and-transforms/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 18:05:11 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Learn Titanium Appcelerator]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[animation events]]></category>
		<category><![CDATA[autoreverse]]></category>
		<category><![CDATA[examples]]></category>
		<category><![CDATA[titanium appcelerator]]></category>
		<category><![CDATA[transforms]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=1977</guid>
		<description><![CDATA[Almost any UI element can be animated and transformed, allowing you to add to your application some eye candy or simply take advantage of predefined elements to give them a new role. For those familiar with <strong>CSS3 animations</strong> this will come very easy as the concept it's pretty the same.

<h2>Animations</h2>
Pointless to say, an animation will change one or more properties of an element form the current stage to another (set by us) in a period of time.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fseven-days-with-titanium-day-6%25e2%2580%2593animations-and-transforms%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fseven-days-with-titanium-day-6%25e2%2580%2593animations-and-transforms%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Almost any UI element can be animated and transformed, allowing you to add to your application some eye candy or simply take advantage of predefined elements to give them a new role. For those familiar with <strong>CSS3 animations</strong> this will come very easy as the concept it&#8217;s pretty the same.</p>
<h2>Animations</h2>
<p>Pointless to say, an animation will change one or more properties of an element form the current stage to another (set by us) in a period of time.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> my_view <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
    backgroundColor<span style="color: #339933;">:</span><span style="color: #3366CC;">'#f00'</span><span style="color: #339933;">,</span>
    height<span style="color: #339933;">:</span><span style="color: #CC0000;">20</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
my_view.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>height<span style="color: #339933;">:</span><span style="color: #CC0000;">100</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The simple code above will <strong>animate the height of my_view from 20 to 100</strong>.</p>
<p>You can complicate the things more <strong>adding more properties to animate</strong> (like the background color, opacity, etc), <strong>a duration</strong> (that needs to be in ms) and <strong>a curve </strong>(like ease-out or liniar, etc)</p>
<h3>Some examples</h3>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> view <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	width<span style="color: #339933;">:</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span>
	height<span style="color: #339933;">:</span><span style="color: #CC0000;">20</span><span style="color: #339933;">,</span>
	backgroundColor<span style="color: #339933;">:</span><span style="color: #3366CC;">'#f00'</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
win.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>view<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
view.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	height<span style="color: #339933;">:</span><span style="color: #CC0000;">300</span><span style="color: #339933;">,</span> 
	backgroundColor<span style="color: #339933;">:</span><span style="color: #3366CC;">'#00f'</span><span style="color: #339933;">,</span> 
	duration<span style="color: #339933;">:</span><span style="color: #CC0000;">3000</span><span style="color: #339933;">,</span> 
	curve<span style="color: #339933;">:</span>Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">ANIMATION_CURVE_EASE_IN_OUT</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>If you need to make an animation to come back to the element&#8217;s original state and repeat it several times, there are 2 properties that might interest you :<strong>repeat</strong> and <strong>autoreverse</strong></p>
<p>The below code will make <strong>the view &#8220;pulse&#8221; 3 times</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> view <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	width<span style="color: #339933;">:</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span>
	height<span style="color: #339933;">:</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span>
	backgroundColor<span style="color: #339933;">:</span><span style="color: #3366CC;">'#f00'</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
win.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>view<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
view.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	height<span style="color: #339933;">:</span><span style="color: #CC0000;">130</span><span style="color: #339933;">,</span>
	width<span style="color: #339933;">:</span><span style="color: #CC0000;">130</span><span style="color: #339933;">,</span>
	repeat<span style="color: #339933;">:</span><span style="color: #CC0000;">3</span><span style="color: #339933;">,</span>
	autoreverse<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
	curve<span style="color: #339933;">:</span>Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">ANIMATION_CURVE_EASE_IN_OUT</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The animations have 2 events: <strong>start</strong> and <strong>complete</strong>.The <strong>complete event</strong> is very useful because we can chain more animations one after another or start some other actions when the current one stops. </p>
<h2>Transforms</h2>
<p>Similar to CSS3 transforms, in Titanium you can use 2D or 3D transforms.</p>
<p>Basically you create a 2D or a 3D matrix for the transform  or use the predefined &#8220;shortcuts&#8221; &#8211;  (like <strong>scale</strong> or <strong>rotate</strong>) and pass this transform to the object you are creating or to the animation.</p>
<h3>An example with transforms</h3>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> tr_start <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">create2DMatrix</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
tr_start <span style="color: #339933;">=</span> tr_start.<span style="color: #660066;">rotate</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">30</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> tr_end <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">create2DMatrix</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
tr_end <span style="color: #339933;">=</span> tr_end.<span style="color: #660066;">rotate</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #CC0000;">30</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
tr_end <span style="color: #339933;">=</span> tr_end.<span style="color: #660066;">scale</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> view <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	width<span style="color: #339933;">:</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span>
	height<span style="color: #339933;">:</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span>
	transform<span style="color: #339933;">:</span>tr_start<span style="color: #339933;">,</span>
	backgroundColor<span style="color: #339933;">:</span><span style="color: #3366CC;">'#f00'</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
win.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>view<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
view.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	transform<span style="color: #339933;">:</span>tr_end<span style="color: #339933;">,</span>
	repeat<span style="color: #339933;">:</span><span style="color: #CC0000;">3</span><span style="color: #339933;">,</span>
	autoreverse<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
	duration<span style="color: #339933;">:</span><span style="color: #CC0000;">500</span><span style="color: #339933;">,</span>
	curve<span style="color: #339933;">:</span>Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">ANIMATION_CURVE_EASE_IN_OUT</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The best <strong>resources</strong> to see how everything works are the examples provided by the Appcelerator team in the KitchenSink, the entry point being here:<a href="http://bit.ly/eiow0B">http://bit.ly/eiow0B</a></p>
<p>These animations and transforms are not suited to a very intensive usage (like games) but they can be used with success to improve the apps&#8217; look and feel &#8211; and with this, the user experience.</p>
<p>As always, I wait for your questions, suggestions and what are you come up with <img src='http://cssgallery.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<strong class="spanish">Check the Spanish version of this post:<br />
 <a href="http://nosoloweb.es/siete-dias-con-titanium-dia-6-animaciones-y-transformaciones/" rel="me">Siete días con Titanium – día 6 – animaciones y transformaciones</a></strong></p>
<div class="shr-publisher-1977"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fseven-days-with-titanium-day-6%25e2%2580%2593animations-and-transforms%2F' data-shr_title='Seven+days+with+Titanium+%E2%80%93+day+6+%E2%80%93+animations+and+transforms+'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fseven-days-with-titanium-day-6%25e2%2580%2593animations-and-transforms%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fcssgallery.info%2Fseven-days-with-titanium-day-6%25e2%2580%2593animations-and-transforms%2F' data-shr_title='Seven+days+with+Titanium+%E2%80%93+day+6+%E2%80%93+animations+and+transforms+'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><h3>Related posts:</h3><ol>
<li><a href='http://cssgallery.info/seven-days-with-titanium-day-1-windows-views-navigation-and-tabs/' rel='bookmark' title='Seven days with Titanium – day 1 – windows, views, navigation and tabs'>Seven days with Titanium – day 1 – windows, views, navigation and tabs</a></li>
<li><a href='http://cssgallery.info/seven-days-with-titanium-day-0-introduction/' rel='bookmark' title='Seven days with Titanium &#8211; day 0 &#8211; introduction'>Seven days with Titanium &#8211; day 0 &#8211; introduction</a></li>
<li><a href='http://cssgallery.info/seven-days-with-titanium-day-2-tables-and-pickers/' rel='bookmark' title='Seven days with Titanium – day 2 &#8211; tables and pickers'>Seven days with Titanium – day 2 &#8211; tables and pickers</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/seven-days-with-titanium-day-6%e2%80%93animations-and-transforms/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

