<?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>geedew &#187; css</title>
	<atom:link href="http://www.geedew.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.geedew.com</link>
	<description>flirting with the accessible web</description>
	<lastBuildDate>Wed, 13 Apr 2011 22:46:59 +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>Box-Shadow will crash us all</title>
		<link>http://www.geedew.com/2011/04/03/box-shadow-will-crash-us-all/</link>
		<comments>http://www.geedew.com/2011/04/03/box-shadow-will-crash-us-all/#comments</comments>
		<pubDate>Sun, 03 Apr 2011 12:12:33 +0000</pubDate>
		<dc:creator>drew</dc:creator>
				<category><![CDATA[css3]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://www.geedew.com/?p=276</guid>
		<description><![CDATA[Box-Shadow isn't always smart.]]></description>
			<content:encoded><![CDATA[<p>In CSS3, some of the newest features can bite you.  Recently, I discovered a serious issue with box-shadow and rendering. Box-shadow is a new feature that creates a shadow effect either outset (around a box) or inset (inside a box, like a glow). What I wanted to do, was create a soft glow on the inside of a website, using &lt;body>, so that the entire site had an easy fade.  The code that I <del datetime="2011-04-03T12:13:45+00:00">used was</del> currently use is:</p>
<pre class="brush: css; title: ; notranslate">
body {
-moz-box-shadow: inset 0 0 8px rgba(0,0,0, 0.25);
-webkit-box-shadow: inset 0 0 8px rgba(0,0,0, 0.25);
}
</pre>
<p>This code actually <del datetime="2011-04-03T12:13:45+00:00">worked</del>works, and I didn&#8217;t notice any issues.  However, the 8px fade was too abrupt; I kicked it up &#8216;just a tad&#8217; to 200px (I have large &#8216;tads&#8217;).  Big mistake as all &#8216;advanced&#8217; browsers were crumbling in my wake.  If they support box-shadow, they failed. The page loaded, but scrolling was a complete and utter failure.</p>
<p>For now, I will have to avoid doing this, especially to the large &lt;body> tag.  I will chime back in on the topic once I get some solid evidence and facts about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geedew.com/2011/04/03/box-shadow-will-crash-us-all/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advanced button theming on jQuery UI Dialog</title>
		<link>http://www.geedew.com/2010/06/10/advanced-button-theming-on-jquery-ui-dialog/</link>
		<comments>http://www.geedew.com/2010/06/10/advanced-button-theming-on-jquery-ui-dialog/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 15:23:23 +0000</pubDate>
		<dc:creator>drew</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.geedew.com/?p=200</guid>
		<description><![CDATA[There is a very annoying bugfeature that I have found when using jQueryUI. It&#8217;s not the themes, they work great, in fact, they are the best thing since sliced bread. But in a &#8216;Cupertino.esc&#8217; way, they provide too much simplicity (&#8230;)</p><p><a href="http://www.geedew.com/2010/06/10/advanced-button-theming-on-jquery-ui-dialog/">Read the rest of this entry &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>	There is a very annoying <del datetime="2010-06-10T14:54:13+00:00">bug</del>feature that I have found when using jQueryUI.  It&#8217;s not the themes, they work great, in fact, they are the best thing since sliced bread.  But in a &#8216;Cupertino.esc&#8217;  way, they provide too much simplicity over the functionality that I require.  This post aims to solve that in a <em>progressive enhancement</em> sorta way.  I am using jQuery 1.4.2. with jQuery UI 1.8.2, it doesn&#8217;t matter what theme  you use with this, but I prefer <em>redmond</em>.</p>
<p><span id="more-200"></span>
<p>
	Let&#8217;s take a look at the core issue.  Here is what a typical dialog looks like in jQueryUI 1.8.2 with some nice buttons.</p>
<div id="attachment_203" class="wp-caption aligncenter" style="width: 310px"><a rel="attachment wp-att-203" href="http://www.geedew.com/2010/06/10/advanced-button-theming-on-jquery-ui-dialog/screen-capture-1/"><img class="size-medium wp-image-203" title="Typical 'Redmond' jQueryUI Dialog" src="http://www.geedew.com/wordpress/wp-content/uploads/2010/06/screen-capture-1-300x191.png" alt="Typical 'Redmond' jQueryUI Dialog" width="300" height="191" /></a><p class="wp-caption-text">Perfect example of a jQueryUI Dialog</p></div>
<p>
	Here&#8217;s the simple code for this.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;article id=&quot;dialogs&quot;&gt;
	&lt;a href=&quot;javascript: void(null);&quot; id=&quot;dialogbutton&quot;&gt;Open Dialog&lt;/a&gt;
	&lt;div title=&quot;this is my test this is my test this is my test this is my test&quot; id=&quot;dialogtest&quot;&gt;
	This is a div dialog test. This is a div dialog test. This is a div dialog test. This is a div dialog test. This is a div dialog test.
	&lt;/div&gt;
&lt;/article&gt;
</pre>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
	$(document).ready(function() {
		/* Create a dialog */
		$(&quot;#dialogtest&quot;).dialog({
                        title: &quot;Alert!&quot;,
			modal: true,
			buttons: {
				&quot;Ok&quot;: function() {
					$(this).dialog(&quot;close&quot;);
				},
				&quot;Cancel&quot;: function() {
					$(this).dialog(&quot;close&quot;);
				}
			}
		});

		/* Add Dialog Button Functionality */
		$('#dialogbutton').click(function(){
			$('#dialogtest').dialog('open');
			return false;
		});
	});

&lt;/script&gt;
</pre>
<p>	That&#8217;s really great, I mean that code is so small and yet you can get such a great looking item out of it.  So how can I have a problem with that? Well let me tell you how the buttons are made, you have a name and then you have that name point to a function.  The name is the text of the button, the function is the action of the button.  And that&#8217;s it. Period.</p>
<p>
	Now, I find it great that I can use these simplistic featuresets and get &#8216;get by&#8217; but normally my &#8220;Cancel don&#8217;t ever touch me button&#8221; is the color red(ish) while my &#8220;Oh you need to hit me to move on&#8221; button is the color green(ish).  But you cannot do that (easily) with this current setup.  In fact it&#8217;s very sloppy to force this setup into doing that and it ends up using a great amount of code just to do one thing, add a class.</p>
<p>
	To solve this, I did what any self respecting JavaScript ninja would do, <del datetime="2010-06-10T14:23:34+00:00">I said goodbye to jQuery UI</del> I opened up the source code and took a peek, found out where I could attack (fix) the code and I did it.<br />
        So before I show you the code, I will show you how I decided buttons should/could be made.  My process is 100% backward compatible, yet more difficult and easier to mess up (the original goal of jQueryUI was obviously to make it as simple as possible).</p>
<p>	Buttons with my code changes can now be made like this</p>
<pre class="brush: jscript; title: ; notranslate">
buttons: {
	&quot;Ok&quot;:  function() {
		$(this).dialog(&quot;close&quot;);
	},
	&quot;Cancel&quot;: {
		action : function() {
			$(this).dialog(&quot;close&quot;);
		},
		type : &quot;cancel&quot;
	}
</pre>
<pre class="brush: css; title: ; notranslate">
/* This is poor CSS by design to be simple and readable */
 div.ui-dialog-buttonpane button.cancel { background:none; border:0px none;color:red; }
</pre>
<p>	and the old way of doing it will still work just fine as well.</p>
<p>	I&#8217;ve gone ahead and added a few features, namely it is now name-points-to-object instead of the old name-points-to-function mentality.  This object has two attributes: action and type.  Action is the old function() that was pointed to and it will be called when this button is clicked. Type is the new feature on the block, it&#8217;s just a CSS class that is added to the function using jQuery.addClass.  I&#8217;ve tried to keep is simple, and at the same time, make it robust and backward compatible.  Here&#8217;s a simple change that is possible using this feature.</p>
<p><a rel="attachment wp-att-210" href="http://www.geedew.com/2010/06/10/advanced-button-theming-on-jquery-ui-dialog/screen-capture-2/"><img class="aligncenter size-medium wp-image-210" title="What jQuery UI dialog buttons should be able to do" src="http://www.geedew.com/wordpress/wp-content/uploads/2010/06/screen-capture-2-300x203.png" alt="A jQuery UI with different colored buttons" width="300" height="203" /></a>
<p>
	Now my dialogs can look like this when I want them to.  This is a big usability thing (make the buttons descriptive, not just in text but in color/design and function).</p>
<p>	So the secret sauce to all of this is actually an extension of the jQueryUI 1.8.2 Dialog code (more like rewrite of some of the code).  This code can only be ran AFTER jQueryUI 1.8.2 has been created, otherwise you will get an error.  I placed this code into the jQueryUI 1.8.2 custom.js file itself for easy keeping; just drop it at the bottom of the file.</p>
<pre class="brush: jscript; title: ; notranslate">
/* TorchUI dialog button fix */
(function($) {
	var _createButtons = $.ui.dialog.prototype._createButtons;
	$.ui.dialog.prototype._createButtons = function(buttons) {
		var self = this,
		hasButtons = false,
		uiDialogButtonPane = $('&lt;div&gt;&lt;/div&gt;')
			.addClass(
				'ui-dialog-buttonpane ' +
				'ui-widget-content ' +
				'ui-helper-clearfix'
			);
		// if we already have a button pane, remove it
		self.uiDialog.find('.ui-dialog-buttonpane').remove();

		if (typeof buttons === 'object' &amp;&amp; buttons !== null) {
			$.each(buttons, function() {
				return !(hasButtons = true);
			});
		}
		if (hasButtons) {
			$.each(buttons, function(name, fn) {
                        /* Begin the code change here */
			// Check to see if fn is being passed in as a funciton, assume it's an object if not.
			 	if(!$.isFunction(fn)) {
			 		var buttonclass=fn.type;var func=fn.action; }
			 	else {
			 		var func=fn; var buttonclass=&quot;&quot;; }
				var button = $('&lt;button type=&quot;button&quot;&gt;&lt;/button&gt;')
					.text(name)
				/* Add a class to the button, if there is a class */
					.addClass(buttonclass)
					.click(function() { func.apply(self.element[0], arguments); })
					.appendTo(uiDialogButtonPane);
				if ($.fn.button) {
					button.button();
				}
			});
			uiDialogButtonPane.appendTo(self.uiDialog);
		}
	}
})(jQuery);
</pre>
<p>	If you have questions, please respond, I promise not to take them personally <img src='http://www.geedew.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.geedew.com/2010/06/10/advanced-button-theming-on-jquery-ui-dialog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bulletproof @font-face</title>
		<link>http://www.geedew.com/2009/12/07/bulletproof-font-face/</link>
		<comments>http://www.geedew.com/2009/12/07/bulletproof-font-face/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 04:12:55 +0000</pubDate>
		<dc:creator>drew</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Bulletproof]]></category>
		<category><![CDATA[Font-Face]]></category>
		<category><![CDATA[Zeldman]]></category>

		<guid isPermaLink="false">http://www.geedew.com/?p=139</guid>
		<description><![CDATA[There is quite an interesting discussion going on at Jeffrey Zeldman&#8217;s blog concerning the @font-face syntax and how to make sure that it is working in all browsers. It&#8217;s interesting to see the different &#8216;hacks&#8217; that are being put together (&#8230;)</p><p><a href="http://www.geedew.com/2009/12/07/bulletproof-font-face/">Read the rest of this entry &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>There is quite an interesting discussion going on at <a href="http://www.zeldman.com/2009/12/02/bulletproof-font-face/">Jeffrey Zeldman&#8217;s blog</a> concerning the @font-face syntax and how to make sure that it is working in all browsers.  It&#8217;s interesting to see the different &#8216;hacks&#8217; that are being put together for something that should be hashed out to work well in all major browsers.  Why does this remind me of things like the wonky implementations being played out in html5?!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geedew.com/2009/12/07/bulletproof-font-face/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

