<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Snippets code from my daily experience &#187; css</title>
	<atom:link href="http://dafizilla.wordpress.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://dafizilla.wordpress.com</link>
	<description>Just another unnecessary code resource blog</description>
	<lastBuildDate>Sun, 20 Dec 2009 10:00:19 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='dafizilla.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/635b338f35d7304cae2e1b31926d3592?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Snippets code from my daily experience &#187; css</title>
		<link>http://dafizilla.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dafizilla.wordpress.com/osd.xml" title="Snippets code from my daily experience" />
		<item>
		<title>How to get element style values from XUL (or HTML)</title>
		<link>http://dafizilla.wordpress.com/2008/04/07/how-to-know-element-style-values-from-xul-and-html/</link>
		<comments>http://dafizilla.wordpress.com/2008/04/07/how-to-know-element-style-values-from-xul-and-html/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 18:15:34 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[table2clipboard]]></category>
		<category><![CDATA[xul]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/?p=50</guid>
		<description><![CDATA[I&#8217;m working to my Extend Firefox 2 Runner Up winner Table2Clipboard.
Many users tell me to add a simple feature, exclude cells having style display: none.
The solution is so straightforward that I could not believe after initial implementation.
You can style an element using CSS selectors
.invisible {
display: none;
}
&#60;span id=&#8220;invisibleSpan&#8221; class=&#8220;invisible&#8221;&#62;I&#8217;m invisible man&#60;/span&#62;
or using the attribute style attribute
&#60;span [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=50&subd=dafizilla&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;m working to my Extend Firefox 2 <a href="http://blog.mozilla.com/extendfirefox/2008/03/12/announcing-the-extend-firefox-2-winners/">Runner Up</a> winner <a href="http://dafizilla.sourceforge.net/table2clip/index.php">Table2Clipboard</a>.</p>
<p>Many users tell me to add a simple feature, exclude cells having style display: none.</p>
<p>The solution is so straightforward that I could not believe after initial implementation.</p>
<p>You can style an element using CSS selectors</p>
<p>.<span style="color:#008b8b;">invisible</span> <span style="color:#871f78;">{</span><br />
display: <span style="color:#871f78;">none</span>;<br />
<span style="color:#871f78;">}</span></p>
<p><span style="color:#0000ff;">&lt;span</span> <span style="color:#871f78;">id</span><span style="color:#871f78;">=</span><span style="color:#23238e;">&#8220;invisibleSpan&#8221;</span> <span style="color:#871f78;">class=</span><span style="color:#23238e;">&#8220;invisible&#8221;</span><span style="color:#0000ff;">&gt;</span>I&#8217;m invisible man<span style="color:#0000ff;">&lt;/span&gt;</span></p>
<p>or using the attribute style attribute</p>
<p><span style="color:#0000ff;">&lt;span</span> <span style="color:#871f78;">id</span><span style="color:#871f78;">=</span><span style="color:#23238e;">&#8220;invisibleSpan&#8221;</span> <span style="color:#871f78;">style=</span><span style="color:#23238e;">&#8220;display : none&#8221;</span><span style="color:#0000ff;">&gt;</span>I&#8217;m invisible man<span style="color:#0000ff;">&lt;/span&gt;</span></p>
<p>These two ways can both simply handled using <a href="http://developer.mozilla.org/en/docs/DOM:window.getComputedStyle">getComputedStyle</a></p>
<p><span style="color:#871f78;">var</span> spanElement <span style="color:#871f78;">=</span> document.getElementById<span style="color:#871f78;">(</span><span style="color:#23238e;">&#8220;invisibleSpan&#8221;</span><span style="color:#871f78;">)</span>;<br />
<span style="color:#871f78;">var</span> style <span style="color:#871f78;">=</span> spanElement.ownerDocument.defaultView.getComputedStyle<span style="color:#871f78;">(</span>spanElement, <span style="color:#871f78;">null</span><span style="color:#871f78;">)</span>;<br />
<span style="color:#871f78;">var</span> displayValue <span style="color:#871f78;">=</span> style.getPropertyValue<span style="color:#871f78;">(</span><span style="color:#23238e;">&#8220;display&#8221;</span><span style="color:#871f78;">)</span>;</p>
<p>That&#8217;s all folks!!</p>
<p>Obviously you can use any CSS attribute not only <span style="color:#23238e;">display</span>.</p>
<p>Pay attention to ownerDocument.defaultView, you should use window.getComputedStyle() but under XUL this doesn&#8217;t return what you expect.</p>
<p>getComputedStyle can be used in normal unprivileged HTML code, too.</p>
<p>getComputedStyle is a W3C standard and is present on Internet Explorer, Opera and Safari, too.</p>
<p>Little things make developer life easier.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dafizilla.wordpress.com/50/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dafizilla.wordpress.com/50/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=50&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2008/04/07/how-to-know-element-style-values-from-xul-and-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5759d7f64a710425e4ab730ba7a8311e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
		<item>
		<title>XUL and textbox CSS styles</title>
		<link>http://dafizilla.wordpress.com/2008/03/30/xul-and-textbox-css-styles/</link>
		<comments>http://dafizilla.wordpress.com/2008/03/30/xul-and-textbox-css-styles/#comments</comments>
		<pubDate>Sun, 30 Mar 2008 10:46:40 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
				<category><![CDATA[-moz-appearance]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[xul]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/?p=48</guid>
		<description><![CDATA[If you want to change the background color for HTML input text boxes you simply set the background-color style attribute, very obvious.
.my-textbox {
background-color: red;
}
If you want to make same thing for XUL textboxes you apply the same style attribute discovering it doesn&#8217;t work&#8230;  
Ehm.. It works but you must disable standard mozilla behaviour using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=48&subd=dafizilla&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you want to change the background color for HTML input text boxes you simply set the <b>background-color</b> style attribute, very obvious.</p>
<p>.<font color="#008b8b">my-textbox</font> <font color="#871f78">{</font><br />
background-color: <font color="#871f78">red</font>;<br />
<font color="#871f78">}</font></p>
<p>If you want to make same thing for XUL <a href="http://developer.mozilla.org/en/docs/XUL:textbox">textboxes</a> you apply the same style attribute discovering it doesn&#8217;t work&#8230; <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Ehm.. It works but you must disable standard mozilla behaviour using <a href="http://developer.mozilla.org/en/docs/CSS:-moz-appearance">-moz-appearance</a> attribute</p>
<p>.<font color="#008b8b">my-textbox</font> <font color="#871f78">{<br />
</font>  -moz-appearance: <font color="#871f78">none</font>;<br />
background-color: <font color="#871f78">red</font>;<br />
<font color="#871f78">}</font></p>
<p>Little lesson learned <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dafizilla.wordpress.com/48/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dafizilla.wordpress.com/48/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=48&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2008/03/30/xul-and-textbox-css-styles/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5759d7f64a710425e4ab730ba7a8311e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
		<item>
		<title>XBL, CSS selectors priority and Firefox 3</title>
		<link>http://dafizilla.wordpress.com/2008/03/11/xbl-css-selectors-priority-and-firefox-3/</link>
		<comments>http://dafizilla.wordpress.com/2008/03/11/xbl-css-selectors-priority-and-firefox-3/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 18:58:43 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[gecko]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[xbl]]></category>
		<category><![CDATA[xul]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/?p=42</guid>
		<description><![CDATA[I wrote a little XBL component to allow menuitems to have images centered, I added it to Firefox 2 browser context menu and worked fine immediately, after a while I installed component on Firefox 3 beta 4 and surprisingly the menuitem didn&#8217;t show the image  
I&#8217;ve asked help on Mozilla IRC and after about [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=42&subd=dafizilla&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I wrote a little XBL component to allow menuitems to have images centered, I added it to Firefox 2 browser context menu and worked fine immediately, after a while I installed component on Firefox 3 beta 4 and surprisingly the menuitem didn&#8217;t show the image <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>I&#8217;ve asked help on <a href="irc://irc.mozilla.org/extdev">Mozilla IRC</a> and after about an hour the mistery was revealed.</p>
<p>The innocent CSS declaration shown below works fine on Firefox 2</p>
<p>.<font color="#008b8b">menuitem-image-center</font> <font color="#871f78">{</font><br />
-moz-binding<font color="#871f78">: url(</font><font color="#23238e">&#8216;chrome://morekomodo/content/bindings/menu.xml#menuitemImageCenterBinding&#8217;</font><font color="#871f78">);</font><br />
<font color="#871f78">}</font></p>
<p>but requires a little modification on Firefox 3 beta 5pre (at this time the latest available)</p>
<p>.<font color="#008b8b">menuitem-image-center</font> {<br />
-moz-binding<font color="#871f78">: url(</font><font color="#23238e">&#8216;chrome://morekomodo/content/bindings/menu.xml#menuitemImageCenterBinding&#8217;</font><font color="#871f78">)</font><br />
<font color="#ff0000">!important</font>;<br />
<font color="#871f78">}</font></p>
<p>You must notice the selector without <font color="#ff0000">!important</font> attribute works on Firefox 3 when applied on menus different from browser context menu.</p>
<p>I suspect the browser context menu should have some special treatment on new Firefox&#8230;</p>
<p><a href="http://dafizilla.files.wordpress.com/2008/03/aa.jpg" title="Context menu"></a></p>
<div style="text-align:center;"><a href="http://dafizilla.files.wordpress.com/2008/03/aa.jpg" title="Context menu"><img src="http://dafizilla.files.wordpress.com/2008/03/aa.jpg" alt="Context menu" /></a></div>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dafizilla.wordpress.com/42/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dafizilla.wordpress.com/42/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=42&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2008/03/11/xbl-css-selectors-priority-and-firefox-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5759d7f64a710425e4ab730ba7a8311e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>

		<media:content url="http://dafizilla.files.wordpress.com/2008/03/aa.jpg" medium="image">
			<media:title type="html">Context menu</media:title>
		</media:content>
	</item>
	</channel>
</rss>