<?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>Flex Stuff by Gilles Guillemin &#187; Degrafa</title>
	<atom:link href="http://www.flexstuff.co.uk/category/degrafa/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flexstuff.co.uk</link>
	<description>Stuff about Flex. And Air. Oh and Flash. And probably about other stuff as well. Who knows?</description>
	<lastBuildDate>Wed, 07 Apr 2010 05:46:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Degrafa: Extend CSSSkin to skin Flex Buttons</title>
		<link>http://www.flexstuff.co.uk/2009/04/30/degrafa-extend-cssskin-to-skin-flex-buttons/</link>
		<comments>http://www.flexstuff.co.uk/2009/04/30/degrafa-extend-cssskin-to-skin-flex-buttons/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 12:12:48 +0000</pubDate>
		<dc:creator>gillesguillemin</dc:creator>
				<category><![CDATA[Degrafa]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[Button]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSSButtonSkin]]></category>
		<category><![CDATA[cssskin]]></category>
		<category><![CDATA[skinning]]></category>

		<guid isPermaLink="false">http://www.flexstuff.co.uk/?p=169</guid>
		<description><![CDATA[How to extend Degrafa's CSSSKin class in order to skin Flex Buttons with Degrafa using CSS tags only.
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<br />
<b>Warning</b>:  curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: Unable to access /tmp/binget-cookie.txt in <b>/home/flexstu1/public_html/wp-content/plugins/sniptorg-highlighted-code-embed/snipt_org_embed.php</b> on line <b>135</b><br />
<br />
<b>Warning</b>:  curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in <b>/home/flexstu1/public_html/wp-content/plugins/sniptorg-highlighted-code-embed/snipt_org_embed.php</b> on line <b>136</b><br />

<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.flexstuff.co.uk%252F2009%252F04%252F30%252Fdegrafa-extend-cssskin-to-skin-flex-buttons%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Degrafa%3A%20Extend%20CSSSkin%20to%20skin%20Flex%20Buttons%22%20%7D);"></div>
<p><a title="Degrafa: nice and easy gradients with CSSSkin" href="http://www.flexstuff.co.uk/2009/04/14/degrafa-nice-and-easy-gradients-with-cssskin/" target="_blank">In my previous post</a>, I explained how to create nice gradients using <strong><em>Degrafa&#8217;s CSSSkin</em></strong>. Once again, <strong><em>CSSSkin</em></strong> is one of the very powerful, yet overlooked function of the <strong><em>Degrafa framework</em></strong> (<a title="CSSSKin example 1" href="http://www.degrafa.org/source/CSSSkin/CSSSkin.html" target="_blank">look at this</a>, or <a title="CSSSKin example 2" href="http://www.degrafa.org/source/AdvancedCSS/AdvancedCSS.html" target="_blank">that</a> for those who would still doubt it). But it has in my opinion a limitation: it works almost only for containers (<strong><em>Canvas, Panel, List</em></strong>, etc). But as it stands by default in the latest version (Beta 3.1), it doesn&#8217;t work for buttons (<strong><em>Button, ButtonBar</em></strong> and the like). When it comes to the define CSS tags like <strong><em>upSkin, downSkin, selectedOverSkin</em></strong>, etc, there&#8217;s no choice but to use tailor made classes extending <strong><em>GraphicBorderSkin</em></strong> <a title="iPhone Skin with Degrafa" href="http://www.flexstuff.co.uk/2009/04/14/degrafa-nice-and-easy-gradients-with-cssskin/" target="_blank">like in this example</a>.  But actually, there&#8217;s a rather easy way to use <strong><em>CSSSkin</em></strong> defined in a CSS file only, by simply extending <strong><em>CSSSkin</em></strong>.</p>
<p><span id="more-169"></span>This is why I&#8217;ve created the following class, <strong><em>CSSButtonSkin</em></strong>:</p>
<p><script type="text/javascript" src="http://embed.snipt.org/Vnn"></script><noscript>if(embedStylesPrinted != true) {document.write('<link type="text/css" rel="stylesheet" href="http://snipt.org/snipt/extend/embed/snipt_js.css">');}var embedStylesPrinted = true;v1var content = '<div id="snipt-embed-967340097" class="snipt-embed" ><div class="snipt-embed-meta-container"><div class="snipt-embed-title">asdf</div><div class="snipt-embed-language">asp</div></div><div class="snipt-embed-code" style="background-color:#fafafa"><pre class="asp" style="font-size:12px;color: #;">fds</pre></div><div class="snipt-embed-byline" style="display:block"><div class="snipt-embed-logo" style="display:inline-block"><a href="http://snipt.org/Ggoln1" title="Powered by Snipt.org - Easily share source code" style="text-decoration:none"><img src="http://snipt.org/snipt/images/embed_logo.png" border="0"></a></div><!--<div class="snipt-embed-poweredby" style="display:inline-block"><a href="http://snipt.org/Ggoln1" title="Easily share source code">powered by snipt.org</a></div>--></div></div><style type="text/css">  #snipt-embed-967340097 pre {    background-color: #fafafa !important;    background-image: none !important;  }</style>';document.write(content);<br>[code snippet: <a href="http://snipt.org/Vnn">http://snipt.org/Vnn</a>]</noscript></p>
<p>And now an example on how to use it (click to launch then right-click to see the code):</p>
<div class="wp-caption aligncenter" style="width: 450px"><a class="lightview" title="CSSButtonSkin Example :: Degrafa CSSButtonSkin Example (Right-click for the sources) :: width: 600, height: 400" href="http://www.flexstuff.co.uk/wp-content/uploads/examples/degrafa/cssbuttonskin/CSSButtonSkin_example.swf"><img src="http://www.flexstuff.co.uk/wp-content/uploads/examples/degrafa/cssbuttonskin/Degrafa_CSSButtonSkin_Sample.jpg" alt="AutosizeTextArea Example" width="440" height="293" /></a><p class="wp-caption-text">Degrafa CSSButtonSkin Example (click to Launch)</p></div>
<p>Note that the &#8220;child skin&#8221; (upSkin for example) inherits its parent&#8217;s styles, so there&#8217;s no need to re-declare them.</p>
<p>Now that was easy, wasn&#8217;t it?</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.flexstuff.co.uk%2F2009%2F04%2F30%2Fdegrafa-extend-cssskin-to-skin-flex-buttons%2F';
  addthis_title  = 'Degrafa%3A+Extend+CSSSkin+to+skin+Flex+Buttons';
  addthis_pub    = 'gillesguillemin';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>

<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.flexstuff.co.uk/2009/04/30/degrafa-extend-cssskin-to-skin-flex-buttons/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Degrafa: nice and easy gradients with CSSSkin</title>
		<link>http://www.flexstuff.co.uk/2009/04/14/degrafa-nice-and-easy-gradients-with-cssskin/</link>
		<comments>http://www.flexstuff.co.uk/2009/04/14/degrafa-nice-and-easy-gradients-with-cssskin/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 09:36:03 +0000</pubDate>
		<dc:creator>gillesguillemin</dc:creator>
				<category><![CDATA[Degrafa]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[cssskin]]></category>
		<category><![CDATA[gradient]]></category>
		<category><![CDATA[mxml]]></category>
		<category><![CDATA[skinning]]></category>
		<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://www.flexstuff.co.uk/?p=211</guid>
		<description><![CDATA[Some examples and explanations on how to easily create nice gradients using Degrafa Advanced CSS and CSSSKin.
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<br />
<b>Warning</b>:  curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: Unable to access /tmp/binget-cookie.txt in <b>/home/flexstu1/public_html/wp-content/plugins/sniptorg-highlighted-code-embed/snipt_org_embed.php</b> on line <b>135</b><br />
<br />
<b>Warning</b>:  curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in <b>/home/flexstu1/public_html/wp-content/plugins/sniptorg-highlighted-code-embed/snipt_org_embed.php</b> on line <b>136</b><br />
<br />
<b>Warning</b>:  curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: Unable to access /tmp/binget-cookie.txt in <b>/home/flexstu1/public_html/wp-content/plugins/sniptorg-highlighted-code-embed/snipt_org_embed.php</b> on line <b>135</b><br />
<br />
<b>Warning</b>:  curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in <b>/home/flexstu1/public_html/wp-content/plugins/sniptorg-highlighted-code-embed/snipt_org_embed.php</b> on line <b>136</b><br />
<br />
<b>Warning</b>:  curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: Unable to access /tmp/binget-cookie.txt in <b>/home/flexstu1/public_html/wp-content/plugins/sniptorg-highlighted-code-embed/snipt_org_embed.php</b> on line <b>135</b><br />
<br />
<b>Warning</b>:  curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in <b>/home/flexstu1/public_html/wp-content/plugins/sniptorg-highlighted-code-embed/snipt_org_embed.php</b> on line <b>136</b><br />
<br />
<b>Warning</b>:  curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: Unable to access /tmp/binget-cookie.txt in <b>/home/flexstu1/public_html/wp-content/plugins/sniptorg-highlighted-code-embed/snipt_org_embed.php</b> on line <b>135</b><br />
<br />
<b>Warning</b>:  curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in <b>/home/flexstu1/public_html/wp-content/plugins/sniptorg-highlighted-code-embed/snipt_org_embed.php</b> on line <b>136</b><br />
<br />
<b>Warning</b>:  curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: Unable to access /tmp/binget-cookie.txt in <b>/home/flexstu1/public_html/wp-content/plugins/sniptorg-highlighted-code-embed/snipt_org_embed.php</b> on line <b>135</b><br />
<br />
<b>Warning</b>:  curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in <b>/home/flexstu1/public_html/wp-content/plugins/sniptorg-highlighted-code-embed/snipt_org_embed.php</b> on line <b>136</b><br />

<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.flexstuff.co.uk%252F2009%252F04%252F14%252Fdegrafa-nice-and-easy-gradients-with-cssskin%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Degrafa%3A%20nice%20and%20easy%20gradients%20with%20CSSSkin%22%20%7D);"></div>
<p><a title="Degrafa.org website" href="http://www.degrafa.org" target="_blank">Degrafa</a> is a fantastic tool and has become for the past few months a core component of all my developments at <a title="Tailgate Technologies Website" href="http://www.tailgatetechnologies.com/en/Home/Default.aspx" target="_blank">Tailgate Technologies</a>. Still, some very powerful tools among Degrafa Framework seem to be a bit underused by most users (at least most bloggers). I&#8217;m thinking here of Advanced CSS with CSSSkin class. Or at least, there rather is a relative lack of examples and documentations on how to use it. You can still find on <a title="Advanced CSS examples" href="http://www.degrafa.org/samples/#adv-css" target="_blank">Degrafa&#8217;s website</a> <a title="Advanced CSS by Ben Stucki" href="http://www.degrafa.org/source/CSSSkin/CSSSkin.html" target="_blank">Ben Stuki&#8217;s example</a> along with <a title="Sky background by Juan Sanchez" href="http://www.degrafa.org/source/AdvancedCSS/AdvancedCSS.html" target="_blank">Juan Sanchez&#8217; one</a>, but when you try and watch <a title="Learning Degrafa" href="http://www.degrafa.org/learning/" target="_blank">the screencast tutorials</a> you unfortunately end up hitting dead ends. One thing in particular took me a significant while to figure out: how to set elaborate gradients (for a background color for example), so I thought that sharing my discoveries (and improvements in a further post) might be useful to some of you.</p>
<p><span id="more-211"></span>First, a very simple example:</p>
<div class="wp-caption aligncenter" style="width: 336px"><a class="lightview" title="Degrafa Gradients :: Example 1 (Right-click for the sources) :: width: 400, height: 300" href="http://flexstuff.co.uk/wp-content/uploads/examples/degrafa/gradients/Example1.swf"><img src="http://flexstuff.co.uk/wp-content/uploads/examples/degrafa/gradients/Degrafa Gradients - Example 1.png" alt="Degrafa Gradients Example 1" width="326" height="273" /></a><p class="wp-caption-text">Degrafa Gradients Example 1 (click to Launch)</p></div>
<p><script type="text/javascript" src="http://embed.snipt.org/Smi"></script><noscript>if(embedStylesPrinted != true) {document.write('<link type="text/css" rel="stylesheet" href="http://snipt.org/snipt/extend/embed/snipt_js.css">');}var embedStylesPrinted = true;v1var content = '<div id="snipt-embed-767403892" class="snipt-embed" ><div class="snipt-embed-meta-container"><div class="snipt-embed-title">asdf</div><div class="snipt-embed-language">asp</div></div><div class="snipt-embed-code" style="background-color:#fafafa"><pre class="asp" style="font-size:12px;color: #;">fds</pre></div><div class="snipt-embed-byline" style="display:block"><div class="snipt-embed-logo" style="display:inline-block"><a href="http://snipt.org/Ggolo2" title="Powered by Snipt.org - Easily share source code" style="text-decoration:none"><img src="http://snipt.org/snipt/images/embed_logo.png" border="0"></a></div><!--<div class="snipt-embed-poweredby" style="display:inline-block"><a href="http://snipt.org/Ggolo2" title="Easily share source code">powered by snipt.org</a></div>--></div></div><style type="text/css">  #snipt-embed-767403892 pre {    background-color: #fafafa !important;    background-image: none !important;  }</style>';document.write(content);<br>[code snippet: <a href="http://snipt.org/Smi">http://snipt.org/Smi</a>]</noscript></p>
<p>As you can see, nothing overly complicated here. A simple gradient, from white to red and from left to right. Two things to notice though:</p>
<ol>
<li>You need to define the CSSSkin class with:
<pre class="css">border-skin<span style="color: #00aa00;">:</span> ClassReference<span style="color: #00aa00;">(</span><span style="color: #ff0000;">"com.degrafa.skins.CSSSkin"</span><span style="color: #00aa00;">)</span><span style="color: #00aa00;">;</span></pre>
</li>
<li>
<p class="css">IMPORTANT: background-color needs to be a string (actually, it&#8217;s an array of strings, but we&#8217;ll come back to this a bit later):</p>
<pre class="css"><span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00aa00;">:</span> <span style="color: #ff0000;">"#FFFFFF #FF0000"</span><span style="color: #00aa00;">;</span></pre>
</li>
</ol>
<p>Let&#8217;s now change  the gradient&#8217;s orientation:</p>
<div class="wp-caption aligncenter" style="width: 338px"><a class="lightview" title="Degrafa Gradients :: Example 2 (Right-click for the sources) :: width: 400, height: 300" href="http://flexstuff.co.uk/wp-content/uploads/examples/degrafa/gradients/Example2.swf"><img src="http://flexstuff.co.uk/wp-content/uploads/examples/degrafa/gradients/Degrafa Gradients - Example 2.png" alt="Degrafa Gradients Example 2" width="328" height="277" /></a><p class="wp-caption-text">Degrafa Gradients Example 2 (click to Launch)</p></div>
<p><script type="text/javascript" src="http://embed.snipt.org/Smm"></script><noscript>if(embedStylesPrinted != true) {document.write('<link type="text/css" rel="stylesheet" href="http://snipt.org/snipt/extend/embed/snipt_js.css">');}var embedStylesPrinted = true;v1var content = '<div id="snipt-embed-550919432" class="snipt-embed" ><div class="snipt-embed-meta-container"><div class="snipt-embed-title">asdf</div><div class="snipt-embed-language">asp</div></div><div class="snipt-embed-code" style="background-color:#fafafa"><pre class="asp" style="font-size:12px;color: #;">fds</pre></div><div class="snipt-embed-byline" style="display:block"><div class="snipt-embed-logo" style="display:inline-block"><a href="http://snipt.org/Ggolp4" title="Powered by Snipt.org - Easily share source code" style="text-decoration:none"><img src="http://snipt.org/snipt/images/embed_logo.png" border="0"></a></div><!--<div class="snipt-embed-poweredby" style="display:inline-block"><a href="http://snipt.org/Ggolp4" title="Easily share source code">powered by snipt.org</a></div>--></div></div><style type="text/css">  #snipt-embed-550919432 pre {    background-color: #fafafa !important;    background-image: none !important;  }</style>';document.write(content);<br>[code snippet: <a href="http://snipt.org/Smm">http://snipt.org/Smm</a>]</noscript></p>
<p>Here we&#8217;ve added a new parameter at the beginning of the string: 90deg (without space!). It indicates the orientation of the gradient. Here 90 degrees clockwise. Could be the usual positive or negative value for orientation (90deg, -90deg, 180deg, -180deg&#8230;).</p>
<p>Now, the other paremeters:</p>
<div class="wp-caption aligncenter" style="width: 340px"><a class="lightview" title="Degrafa Gradients :: Example 3 (Right-click for the sources) :: width: 400, height: 300" href="http://flexstuff.co.uk/wp-content/uploads/examples/degrafa/gradients/Example3.swf"><img src="http://flexstuff.co.uk/wp-content/uploads/examples/degrafa/gradients/Degrafa Gradients - Example 3.png" alt="Degrafa Gradients Example 3" width="330" height="277" /></a><p class="wp-caption-text">Degrafa Gradients Example 3 (click to Launch)</p></div>
<p><script type="text/javascript" src="http://embed.snipt.org/Smn"></script><noscript>if(embedStylesPrinted != true) {document.write('<link type="text/css" rel="stylesheet" href="http://snipt.org/snipt/extend/embed/snipt_js.css">');}var embedStylesPrinted = true;v1var content = '<div id="snipt-embed-278253649" class="snipt-embed" ><div class="snipt-embed-meta-container"><div class="snipt-embed-title">asdf</div><div class="snipt-embed-language">asp</div></div><div class="snipt-embed-code" style="background-color:#fafafa"><pre class="asp" style="font-size:12px;color: #;">fds</pre></div><div class="snipt-embed-byline" style="display:block"><div class="snipt-embed-logo" style="display:inline-block"><a href="http://snipt.org/Ggomg6" title="Powered by Snipt.org - Easily share source code" style="text-decoration:none"><img src="http://snipt.org/snipt/images/embed_logo.png" border="0"></a></div><!--<div class="snipt-embed-poweredby" style="display:inline-block"><a href="http://snipt.org/Ggomg6" title="Easily share source code">powered by snipt.org</a></div>--></div></div><style type="text/css">  #snipt-embed-278253649 pre {    background-color: #fafafa !important;    background-image: none !important;  }</style>';document.write(content);<br>[code snippet: <a href="http://snipt.org/Smn">http://snipt.org/Smn</a>]</noscript></p>
<p>No visible change here. Still, two new parameters appear for each color:</p>
<ol>
<li>The first parameter, in percent (without space!) is the percentage of the surface covered by the color (more about that in the next example)</li>
<li>The second one if the opacity (alpha) of the color, again in percent.</li>
</ol>
<p>Let&#8217;s add a third color:</p>
<div class="wp-caption aligncenter" style="width: 331px"><a class="lightview" title="Degrafa Gradients :: Example 4 (Right-click for the sources) :: width: 400, height: 300" href="http://flexstuff.co.uk/wp-content/uploads/examples/degrafa/gradients/Example4.swf"><img src="http://flexstuff.co.uk/wp-content/uploads/examples/degrafa/gradients/Degrafa Gradients - Example 4.png" alt="Degrafa Gradients Example 4" width="321" height="270" /></a><p class="wp-caption-text">Degrafa Gradients Example 4 (click to Launch)</p></div>
<p><script type="text/javascript" src="http://embed.snipt.org/Smo"></script><noscript>if(embedStylesPrinted != true) {document.write('<link type="text/css" rel="stylesheet" href="http://snipt.org/snipt/extend/embed/snipt_js.css">');}var embedStylesPrinted = true;v1var content = '<div id="snipt-embed-1246620538" class="snipt-embed" ><div class="snipt-embed-meta-container"><div class="snipt-embed-title">asdf</div><div class="snipt-embed-language">asp</div></div><div class="snipt-embed-code" style="background-color:#fafafa"><pre class="asp" style="font-size:12px;color: #;">fds</pre></div><div class="snipt-embed-byline" style="display:block"><div class="snipt-embed-logo" style="display:inline-block"><a href="http://snipt.org/Ggomh3" title="Powered by Snipt.org - Easily share source code" style="text-decoration:none"><img src="http://snipt.org/snipt/images/embed_logo.png" border="0"></a></div><!--<div class="snipt-embed-poweredby" style="display:inline-block"><a href="http://snipt.org/Ggomh3" title="Easily share source code">powered by snipt.org</a></div>--></div></div><style type="text/css">  #snipt-embed-1246620538 pre {    background-color: #fafafa !important;    background-image: none !important;  }</style>';document.write(content);<br>[code snippet: <a href="http://snipt.org/Smo">http://snipt.org/Smo</a>]</noscript></p>
<p>We&#8217;ve added a nice yellow, which is at its maximum &#8220;blending&#8221; with red and white just in the middle of the surface (hence the 50%). It works pretty much like it would do in Photoshop or Fireworks, but code wise.</p>
<p>Last, an example of how I recreate the kind of gradients used for a famous phone (I&#8217;m working at the moment on a pet project, a Flex version of the UI of this famous phone&#8230; I&#8217;ll keep you posted&#8230;):</p>
<div class="wp-caption aligncenter" style="width: 339px"><a class="lightview" title="Degrafa Gradients :: Example 5 (Right-click for the sources) :: width: 400, height: 300" href="http://flexstuff.co.uk/wp-content/uploads/examples/degrafa/gradients/Example5.swf"><img src="http://flexstuff.co.uk/wp-content/uploads/examples/degrafa/gradients/Degrafa Gradients - Example 5.png" alt="Degrafa Gradients Example 5" width="329" height="59" /></a><p class="wp-caption-text">Degrafa Gradients Example 5 (click to Launch)</p></div>
<p><script type="text/javascript" src="http://embed.snipt.org/Smp"></script><noscript>if(embedStylesPrinted != true) {document.write('<link type="text/css" rel="stylesheet" href="http://snipt.org/snipt/extend/embed/snipt_js.css">');}var embedStylesPrinted = true;v1var content = '<div id="snipt-embed-511462619" class="snipt-embed" ><div class="snipt-embed-meta-container"><div class="snipt-embed-title">asdf</div><div class="snipt-embed-language">asp</div></div><div class="snipt-embed-code" style="background-color:#fafafa"><pre class="asp" style="font-size:12px;color: #;">fds</pre></div><div class="snipt-embed-byline" style="display:block"><div class="snipt-embed-logo" style="display:inline-block"><a href="http://snipt.org/Ggomi9" title="Powered by Snipt.org - Easily share source code" style="text-decoration:none"><img src="http://snipt.org/snipt/images/embed_logo.png" border="0"></a></div><!--<div class="snipt-embed-poweredby" style="display:inline-block"><a href="http://snipt.org/Ggomi9" title="Easily share source code">powered by snipt.org</a></div>--></div></div><style type="text/css">  #snipt-embed-511462619 pre {    background-color: #fafafa !important;    background-image: none !important;  }</style>';document.write(content);<br>[code snippet: <a href="http://snipt.org/Smp">http://snipt.org/Smp</a>]</noscript></p>
<p>I told you that background-color was actually an array of strings. Here you get an example of that. All of the opacity parameters of the string are set below 100%. They are partly transparent. Which means you can quickly change the &#8220;theme&#8221; color by adding another &#8220;global&#8221; color after the first string (could be another gradient as well).<br />
Replace the &#8220;#FFFFFF&#8221; at the end of background-color by &#8220;#FF0000&#8243; and see the result for yourself&#8230;</p>
<p>Pretty powerful, no? A few change in a CSS file and the result is already quite significant. Think what you can do by also simply play with individually rounded corners, variable border width, etc&#8230; Next time, I&#8217;ll show you how to simply extend CSSSkin in order to fully skin buttons using Degrafa and CSS.</p>
<p>Stay tuned!</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.flexstuff.co.uk%2F2009%2F04%2F14%2Fdegrafa-nice-and-easy-gradients-with-cssskin%2F';
  addthis_title  = 'Degrafa%3A+nice+and+easy+gradients+with+CSSSkin';
  addthis_pub    = 'gillesguillemin';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>

<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.flexstuff.co.uk/2009/04/14/degrafa-nice-and-easy-gradients-with-cssskin/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

