<?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>Assorted GARbage &#187; CSS3</title>
	<atom:link href="http://blog.assortedgarbage.com/category/css3/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.assortedgarbage.com</link>
	<description>Thoughts, rants and musings about Adobe, the web, technology and 200+ days a year traveling as a software evangelist.</description>
	<lastBuildDate>Thu, 26 Sep 2013 01:17:15 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>Internet Explorer&#8217;s Browser Mode vs Document Mode</title>
		<link>http://blog.assortedgarbage.com/2013/05/internet-explorers-browser-mode-vs-document-mode/</link>
		<comments>http://blog.assortedgarbage.com/2013/05/internet-explorers-browser-mode-vs-document-mode/#comments</comments>
		<pubDate>Thu, 23 May 2013 19:55:13 +0000</pubDate>
		<dc:creator><![CDATA[Greg]]></dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[versions]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://blog.assortedgarbage.com/?p=830</guid>
		<description><![CDATA[Regardless of your personal feelings towards Internet Explorer, as a web professional you know that you have to test your creations in several versions of IE. Of course, that also means that you have to keep several virtual (or even physical) machines available &#8211; and not updated! This has recently become even harder to do with [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Regardless of your personal feelings towards Internet Explorer, as a web professional you know that you have to test your creations in several versions of IE. Of course, that also means that you have to keep several virtual (or even physical) machines available &#8211; and not updated!</p>
<p>This has recently become even harder to do with Microsoft&#8217;s attempt to force-feed browser updates – at least to those on Windows 7 &amp; 8. And while I applaud this effort, it has also complicated matters even more. I recently fired up my copy of Parallels and loaded a Windows 7 image that I use to test IE9&#8230; only to find out that IE had updated itself to version 10! Thankfully, Microsoft has begun to provide &#8220;locked&#8221; VM&#8217;s for testing purposes. You can find them at: <a title="Testing Site for Internet Explorer" href="http://modern.ie/">http://www.modern.ie/</a></p>
<p>Of course, IE has had a method of testing in its Developer Tools for several versions now which allows you to &#8220;fake&#8221; which version of IE you are running. The problem with the feature is that there are two different modes, and it&#8217;s hard to tell (at least for me) what the difference is between the two. So, in the hopes of saving some hair pulling, here&#8217;s an explanation and example.</p>
<p class="pic"><a href="http://blog.assortedgarbage.com/wp-content/2013/05/browser_mode.png" rel="lightbox[830]"><img class="alignnone size-medium wp-image-833" alt="Browser Mode vs Document Mode in Internet Explorer" src="http://blog.assortedgarbage.com/wp-content/2013/05/browser_mode-300x55.png" width="300" height="55" /></a></p>
<p>I was recently assisting my wife, <a title="Stephanie's Twitter page" href="http://twitter.com/stefsull">Stephanie</a>, on a promo page for her company, <a title="Contatta - Simple. Sophisticated. CRM." href="http://contatta.com">Contatta</a>. On the page, they wanted a streamlined (i.e. single page) process for signing up prospects, and we chose to build the experience like an image slider. In keeping with best practices – and the fact that they only wanted IE9+ support, we chose to use CSS3 transitions to generate the motion and state changes. For the four &#8220;states&#8221; of the page, we created a wrapper div that was set to a fixed width/height and set to overflow:hidden. All of the &#8220;elements&#8221; that will &#8220;slide&#8221; in were set to position:absolute and transform:translateX(125%). To create the illusion of movement, we&#8217;ve also created a class that specifies transition:transform .5s linear 0s. Note: I&#8217;ve removed the vendor-specific prefixes.</p>
<p>To slide the element into view, a class is applied (or removed) that changes the translateX() value between -125%, 0 and 125%.</p>
<p class="pic"><iframe src="http://www.youtube.com/embed/t1we5OcBKoQ" height="315" width="420" allowfullscreen="" frameborder="0"></iframe></p>
<p>As you can see it works great in IE 10 – and all kidding aside, Microsoft has done a great job adding HTML5 and CSS3 features to IE 10. But, as you might know, transitions (the &#8220;animation&#8221; of the form) were not supported in Internet Explorer 9. Since my version of IE9 had upgraded itself to IE10, we needed a way to see what the lack of transitions in IE9 would do to the experience. Enter the developer tools&#8230;</p>
<p class="pic"><iframe src="http://www.youtube.com/embed/4yi5BgoP4qU" height="315" width="420" allowfullscreen="" frameborder="0"></iframe></p>
<p>As you can see, when we changed the Browser Mode to IE 9, the browser still transitioned (animated) the form &#8211; but IE 9 doesn&#8217;t support transitions! It&#8217;s not until we changed the Document Mode to IE 9 that the transition no longer happened.</p>
<p>Browser Mode defines the User Agent – what IE tells the server it is. Document Mode on the other hand determines &#8220;what&#8221; or &#8220;how&#8221; IE  will render the page.</p>
<p>Using logic, we could just switch the Document Mode and think we&#8217;re &#8220;good to go&#8221;. But that&#8217;s not true either&#8230; as you can see below:</p>
<p class="pic"><iframe src="http://www.youtube.com/embed/c0l4IDKayfw" height="315" width="420" allowfullscreen="" frameborder="0"></iframe></p>
<p>As it usually happens, after the page was built, &#8220;the powers that be&#8221; decided that they, in fact, did want IE 8 support. Which meant that not only did we have to come up with a solution, we needed to test it too.</p>
<p>There are a number of ways to serve alternate CSS to IE, but we chose to use an IECC (Internet Explorer Conditional Comment) – a stylesheet that is only shown to IE versions less than 9.  As you can see, when we switch the Document Mode to IE8, we get craziness because IE8 does not understand the transform property. As I mentioned earlier, we&#8217;ve used the translateX() value to move the form &#8220;off screen&#8221;. So, for these older versions of IE, instead of using tranform:translateX(125%), we need to set the left (or right) property of the element.</p>
<p>Simply switching the Document Mode, however, did not tell the browser to read the IECC. As far as IE was concerned, it was still IE 9 (or 10 if we had left it at its default). In order to truly emulate IE 8, loading the page and its resources properly, we have to set the Browser Mode as well as the Document Mode.</p>
<p>While I still try to test on an actual version of Internet Explorer, the fact that the Developer Tools allows me to quickly test functionality as well as look and feel, while remaining in IE 10 is a great time saver&#8230; once I figured out what the two modes meant!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.assortedgarbage.com/2013/05/internet-explorers-browser-mode-vs-document-mode/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using Dreamweaver with Sass and Less</title>
		<link>http://blog.assortedgarbage.com/2012/03/using-dreamweaver-with-sass-and-less/</link>
		<comments>http://blog.assortedgarbage.com/2012/03/using-dreamweaver-with-sass-and-less/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 15:00:38 +0000</pubDate>
		<dc:creator><![CDATA[Greg]]></dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://blog.assortedgarbage.com/?p=802</guid>
		<description><![CDATA[When my wife, Stephanie Rewis, decided to leave the gun-for-hire world and join a start-up, she was immediately faced with a decision on which CSS preprocessor to use – Sass or Less. And compounding the problem, her editor of choice, Dreamweaver, doesn&#8217;t provide color coding or hinting for either preprocessor – even though their files [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>When my wife, <a href="http://twitter.com/stefsull">Stephanie Rewis</a>, decided to leave the gun-for-hire world and <a href="http://blog.w3conversions.com/2012/03/new-directions/">join a start-up</a>, she was immediately faced with a decision on which CSS preprocessor to use – <a href="http://sass-lang.com">Sass</a> or <a href="http://lesscss.org/">Less</a>. And compounding the problem, her editor of choice, <a href="http://www.adobe.com/products/dreamweaver.html">Dreamweaver</a>, doesn&#8217;t provide color coding or hinting for either preprocessor – even though their files are really just CSS. So, being the good husband (and evangelist for Dreamweaver) that I am, I set out to remedy the problem. If you&#8217;re wanting to use Sass or Less with Dreamweaver, here&#8217;s how to make it work.</p>
<p>As always, here&#8217;s the disclaimer – you&#8217;re going to be editing files in Dreamweaver&#8217;s Configuration folder, so proceed with caution, make a backup of the originals, etc.</p>
<p>The first thing that we need to do is to tell Dreamweaver that it&#8217;s okay to open a .scss or .less file – something that Dreamweaver by default doesn&#8217;t understand. You&#8217;ll first need to take a peak in your personal Dreamweaver configuration folder – on a Mac, that&#8217;s located in <span id="more-802"></span>~username/Library/Application Support/Adobe/Dreamweaver CS5.5/en_us/Configuration – and locate a file named &#8220;Extensions.txt&#8221;. If, for some reason, this file doesn&#8217;t exist, you can edit the master file located in Adobe Dreamweaver CS5.5/Configuration. Open the file and add SCSS (or SASS if you&#8217;re using the older syntax) and LESS to line 8, so that it reads: CSS,SCSS,LESS:Style Sheets. Save the file and restart Dreamweaver. You should now be able to click on a .scss or .less file in your Site panel and have it open in Dreamweaver.</p>
<p class="pic"><a href="http://blog.assortedgarbage.com/wp-content/2012/03/dw3.jpg" rel="lightbox[802]"><img class="alignnone size-medium wp-image-806" title="Adding Color Coding for Sass and Less" alt="" src="http://blog.assortedgarbage.com/wp-content/2012/03/dw3-300x151.jpg" width="300" height="151" /></a></p>
<p>Now, in order for Dreamweaver to understand that this, in fact, is a CSS file, you&#8217;ll need to edit MMDocumentTypes.xml located in the DocumentTypes folder in the Configuration folder. Open this file and scroll down to line 142. You&#8217;ll notice two properties on that line: winfileextension=&#8221;css&#8221; macfileextension=&#8221;css&#8221;. Add scss and less (comma seperated) to the appropriate property for your platform. Save the file and restart Dreamweaver. Open your .scss or .less file and you should see your familiar CSS code coloring and hinting!</p>
<p class="pic"><a href="http://blog.assortedgarbage.com/wp-content/2012/03/scss.jpg" rel="lightbox[802]"><img class="alignnone size-medium wp-image-803" title="Sass in Dreamweaver" alt="" src="http://blog.assortedgarbage.com/wp-content/2012/03/scss-300x229.jpg" width="300" height="229" /></a></p>
<p>If you&#8217;re serious about your Sass and/or Less, you should be using <a href="http://incident57.com/codekit/">CodeKit</a>, IMHO. CodeKit, in addition to other things, monitors your scss (or less) file for changes and then compiles it into CSS. I&#8217;m using CodeKit and Sass on every project – and loving it! To optimize my workflow, I actually link to the .scss file in my HTML (just remember to remove it before pushing the page live). That way, I can use Dreamweaver&#8217;s split view to edit the .scss file while looking at the page with Live View turned on. When I save the .scss file, CodeKit compiles the file into a CSS file that is also linked in my page. Sadly, Dreamweaver doesn&#8217;t know when the CSS file is changed, but simply hitting F5 (or the refresh button at the top of the document window) causes Dreamweaver&#8217;s Live View to refresh and I can see my changes.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.assortedgarbage.com/2012/03/using-dreamweaver-with-sass-and-less/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>Change happens: border-image breaks in Chrome</title>
		<link>http://blog.assortedgarbage.com/2011/12/change-happens/</link>
		<comments>http://blog.assortedgarbage.com/2011/12/change-happens/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 20:13:18 +0000</pubDate>
		<dc:creator><![CDATA[Greg]]></dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[border-image]]></category>

		<guid isPermaLink="false">http://blog.assortedgarbage.com/2011/12/change-happens-%e2%80%93-border-image-breaks-in-chrome/</guid>
		<description><![CDATA[As anyone who has worked in the front-end dev world knows, keeping up with the &#8220;new&#8221; stuff is challenging. Thankfully, the browser makers have provided vendor prefixes which allow us to use a lot of the new CSS3 properties before they are finalized. But thanks to a reader of my blog, I was made aware [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>As anyone who has worked in the front-end dev world knows, keeping up with the &#8220;new&#8221; stuff is challenging. Thankfully, the browser makers have provided vendor prefixes which allow us to use a lot of the new CSS3 properties before they are finalized. But thanks to a reader of my blog, I was made aware that Chrome (version 16), as they removed the need for a prefix on <a title="Border-image specification" href="http://www.w3.org/TR/css3-background/#border-images">border-image</a>, has also changed the way the property is rendered. This morning, I awoke to find my site broken in the latest version of Chrome.</p>
<p>When I updated this blog to &#8220;HTML5&#8243;, I took the leap and used CSS3 everywhere that I could. This post area was a prime candidate for border-image. For the uninitiated, border-image allows you to use a single image as both a border and fill for an element. All you need to do is specify how much of the top, left, bottom, right of the image will be the borders, and how those pieces should fill each area (stretching or repeating).</p>
<p class="pic"><a href="http://blog.assortedgarbage.com/wp-content/2011/12/slice.png" rel="lightbox[785]"><img class="alignnone size-medium wp-image-789" title="9-slice principle" src="http://blog.assortedgarbage.com/wp-content/2011/12/slice-300x235.png" alt="Illustration of 9-slice from the W3C specification" width="300" height="235" /></a><span class="caption">Diagram illustrating the cuts corresponding to the value ‘25% 30% 12% 20%’ from the W3C specification</span></p>
<p>If you&#8217;ve ever used Fireworks, Illustrator or Flash, they all have a feature known as 9-slice scaling. Border-image is basically the same thing, but done on the fly via CSS. The rule for all posts here looked like this:</p>
<p><code>.post {<br />
margin: 0 0 40px 0;<br />
-webkit-border-image: url(images/article-background-stretch.png) 29 50 55 32 round round;<br />
-moz-border-image: url(images/article-background-stretch.png) 29 50 55 32 round round;<br />
border-image: url(images/article-background-stretch.png) 29 50 55 32 round round;<br />
border-width: 29px 50px 55px 32px;<br />
}</code></p>
<p>In keeping with best practices, you can see that I have listed the official property (without the vendor prefix) last, so that as browsers drop the need for the vendor prefix, they will simply read the last property – and the change will be seamless. Except in the case where all browser vendors are rendering a property different than the spec—thus lulling us into believing their rendering is correct when it is not.</p>
<p class="pic"><a href="http://blog.assortedgarbage.com/wp-content/2011/12/hole.jpg" rel="lightbox[785]"><img class="alignnone size-medium wp-image-788" title="A hole-y article" src="http://blog.assortedgarbage.com/wp-content/2011/12/hole-300x298.jpg" alt="A hole-y article" width="300" height="298" /></a><span class="caption">Don&#8217;t adjust your screen! This is what every post looked like!</span></p>
<p>There is actually an additional value in the spec called &#8220;fill&#8221;. The &#8220;fill&#8221; keyword instructs the browser to render the middle of the image as the background of the element. Without the keyword, the middle remains transparent (ie, the background-image or color is rendered instead). If there is no background-image or color defined for the element, it is simply transparent. Till now, all browsers have ignored the lack of the &#8220;fill&#8221; attribute and rendered the middle regardless. The code above worked perfectly—but it was based on improper rendering.</p>
<p>Chrome (actually, the change was made in Webkit) has recently changed their implementation of the border-image &#8220;fill&#8221; value as described in the spec. This is good, but it will ultimately break a lot of sites since many of us left the fill attribute off since vendors were ignoring it. Sloppy, sure. But it worked&#8230; until today.</p>
<p>So, dive back into your code and add the &#8220;fill&#8221; keyword if your site suddenly looks like swiss cheese. But you&#8217;ll want to (for now) only add the fill value to the non-prefixed version, as the addition of the value currently breaks Firefox if added to the -moz version of your rule (hat tip to <a href="http://twitter.com/chriseppstein">@chriseppstein</a> for that little nugget). My post class now looks like this:</p>
<p><code>border-image: url(images/article-background-stretch.png) 29 50 55 32 fill round round;</code></p>
<p>&#8220;fill&#8221; tells Chrome (and eventually other browsers) to render the center of your image as the background of the element. The two &#8220;round&#8221; values instruct the browser to tile the images on the x- and y-axis.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.assortedgarbage.com/2011/12/change-happens/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>The Importance of &#8220;s&#8221; in CSS3 Transition Shorthand</title>
		<link>http://blog.assortedgarbage.com/2011/08/the-importance-of-s-in-css3-transition-shorthand/</link>
		<comments>http://blog.assortedgarbage.com/2011/08/the-importance-of-s-in-css3-transition-shorthand/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 16:00:44 +0000</pubDate>
		<dc:creator><![CDATA[Greg]]></dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[shorthand]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[transitions]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://blog.assortedgarbage.com/?p=744</guid>
		<description><![CDATA[On a recent project, I spent the better part of an hour (okay, maybe longer) fighting with what I would learn is an interesting anomaly in the way that Firefox (4 and 5) deal with CSS3 shorthand transition notation. What baffled me was the fact that the other players, Webkit (Safari and Chrome) and Opera [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>On a recent <a href="http://geeks4sail.com">project</a>, I spent the better part of an hour (okay, maybe longer) fighting with what I would learn is an interesting anomaly in the way that Firefox (4 and 5) deal with CSS3 shorthand transition notation. What baffled me was the fact that the other players, Webkit (Safari and Chrome) and Opera browsers, worked properly (or least what I thought was proper) with the exact same code. The premise was to have an area with a fixed height, set to overflow: hidden, but then allow the site navigation to scroll (transition) to the proper anchor, resizing the content box&#8217;s height to accommodate the contents while keeping the other contents hidden.</p>
<p>To illustrate the problem, have a look at this simplified example:</p>
<style>
.wrapper { width: 450px; height: 250px; border: 2px solid #452818; background-color: rgba(255,255,255,.4); padding: 4px; overflow: hidden; margin-bottom: 30px;} .wrapper div { float: left; width: 215px; margin-right: 10px; } .one { -webkit-transition: -webkit-transform 2s linear 0; -moz-transition: -moz-transform 2s linear 0; -o-transition: -o-transform 2s linear 0; -ms-transition: transform 2s linear 0; transition: transform 2s linear 0; } .two { -webkit-transition-property: -webkit-transform; -webkit-transition-duration: 2s; -webkit-transition-timing-function: linear; -webkit-transition-delay: 0; -moz-transition-property: -moz-transform; -moz-transition-duration: 2s; -moz-transition-timing-function: linear; -moz-transition-delay: 0; -ms-transition-property: -ms-transform; -ms-transition-duration: 2s; -ms-transition-timing-function: linear; -ms-transition-delay: 0; -o-transition-property: -o-transform; -o-transition-duration: 2s; -o-transition-timing-function: linear; -o-transition-delay: 0; transition-property: transform; transition-duration: 2s; transition-timing-function: linear; transition-delay: 0; } .one:hover, .two:hover { -moz-transform: translateY(-100px); -webkit-transform: translateY(-100px); -o-transform: translateY(-100px); transform: translateY(-100px); }
</style>
<div class="wrapper">
<div class="one">
<p>Sed do eiusmod tempor incididunt ut enim ad minim veniam, excepteur sint occaecat. Quis nostrud exercitation ullamco laboris nisi lorem ipsum dolor sit amet. Mollit anim id est laborum. Consectetur adipisicing elit, ut enim ad minim veniam, eu fugiat nulla pariatur. In reprehenderit in voluptate qui officia deserunt sunt in culpa.</p>
<p>Duis aute irure dolor ut enim ad minim veniam, velit esse cillum dolore. Quis nostrud exercitation. Ut labore et dolore magna aliqua.</p>
<p>Velit esse cillum dolore ut enim ad minim veniam, ullamco laboris nisi. Duis aute irure dolor sed do eiusmod tempor incididunt lorem ipsum dolor sit amet. Velit esse cillum dolore qui officia deserunt ut labore et dolore magna aliqua.</p>
<p>Mollit anim id est laborum. Ut aliquip ex ea commodo consequat. Eu fugiat nulla pariatur.</p>
<p>Ut enim ad minim veniam, velit esse cillum dolore qui officia deserunt. Sunt in culpa. Ullamco laboris nisi ut enim ad minim veniam, ut aliquip ex ea commodo consequat. Ut labore et dolore magna aliqua. Sunt in culpa consectetur adipisicing elit, mollit anim id est laborum.</p>
</div>
<div class="two">
<p>Sed do eiusmod tempor incididunt ut enim ad minim veniam, excepteur sint occaecat. Quis nostrud exercitation ullamco laboris nisi lorem ipsum dolor sit amet. Mollit anim id est laborum. Consectetur adipisicing elit, ut enim ad minim veniam, eu fugiat nulla pariatur. In reprehenderit in voluptate qui officia deserunt sunt in culpa.</p>
<p>Duis aute irure dolor ut enim ad minim veniam, velit esse cillum dolore. Quis nostrud exercitation. Ut labore et dolore magna aliqua.</p>
<p>Velit esse cillum dolore ut enim ad minim veniam, ullamco laboris nisi. Duis aute irure dolor sed do eiusmod tempor incididunt lorem ipsum dolor sit amet. Velit esse cillum dolore qui officia deserunt ut labore et dolore magna aliqua.</p>
<p>Mollit anim id est laborum. Ut aliquip ex ea commodo consequat. Eu fugiat nulla pariatur.</p>
<p>Ut enim ad minim veniam, velit esse cillum dolore qui officia deserunt. Sunt in culpa. Ullamco laboris nisi ut enim ad minim veniam, ut aliquip ex ea commodo consequat. Ut labore et dolore magna aliqua. Sunt in culpa consectetur adipisicing elit, mollit anim id est laborum.</p>
</div>
</div>
<p>The two columns of text each have a <code>transform: translateY(-100px);</code> applied to them on :hover. Additionally, they are both set to transition the effect – thereby &#8220;scrolling&#8221; the text up by 100px. Simple enough. And if you are looking at this in anything other than Firefox, both columns behave the same. <span id="more-744"></span>Of course, if you are looking in Internet Explorer, you won&#8217;t see anything because even with IE9, transforms are not supported. UPDATE: I&#8217;ve added the -ms- prefix for transforms/transitions, and in IE10 this works as it does in the other standards-compliant browsers.</p>
<p>Being that I like to write CSS shorthand when possible (but am moving back away from it for many CSS3 techniques, especially backgrounds), I wrote the transition line in shorthand. Simply <code>transition: transition 2s linear 0;</code> (with the browser specific code omitted for the moment). Testing in Webkit (which is what I use as my initial dev environment browser) showed everything was working properly. So, of course, I didn&#8217;t think more about it until the project was basically complete and I began the round of testing in Firefox, Opera and, yes, IE.</p>
<p>I knew that IE was not going to perform the &#8220;scroll&#8221;, but I was completely shocked to discover that FF was simply &#8220;jumping&#8221; (as you can see in the left column of the example) – exactly the same behavior as IE. I scratched my head in wonder as I ran over to CanIUse.com to make sure that my summer vacation in the Caribbean sun hadn&#8217;t confused my recollection about FF&#8217;s support of the transition property. I was completely baffled, and, in an effort to get to the bottom of the issue, I broke the shorthand out – going from <code>-moz-transition: -moz-transform 2s linear 0;</code> to<br />
<code>-moz-transition-property: -moz-transform;<br />
-moz-transition-duration: 2s;<br />
-moz-transition-timing-function: linear;<br />
-moz-transition-delay: 0;</code></p>
<p>And suddenly things appeared to be working in FF. This is also what you see above. The left column uses shorthand, the right column uses the longhand notation.</p>
<p>Okay, the simple assumption was Firefox doesn&#8217;t support shorthand – but I knew for a fact that that couldn&#8217;t be. After looking at the code for the umpteenth time, I was as baffled as when I wrote it. But a shout-out on the Twitters revealed the answer&#8230; <strong>no &#8220;s&#8221;</strong>.</p>
<p>The &#8220;0&#8243; at the end of the shorthand doesn&#8217;t have a unit. And with that, Firefox fails to execute the entire line. But wait, the longhand version doesn&#8217;t have a unit, so what gives?! Well, that line is actually being ignored as well. But because it&#8217;s longhand, the property, duration and timing-function are all being executed. To confirm, I changed the -delay property in the longhand version and, sure enough, no delay. Going back to the shorthand version, I added the &#8220;s&#8221; to the &#8220;0&#8243;, and, problem solved!</p>
<p>Of course, this begs the question &#8220;why&#8221;, which a number of us spent Sunday afternoon discussing on the Twitters. <a href="http://twitter.com/?/tabatkins">Tab Atkins</a> confirmed that, in fact, the spec requires the unit on instances of time. So, actually, the problem isn&#8217;t a Firefox issue, but rather the fact that Chrome, Safari and Opera are &#8220;allowing&#8221; us to be slack in our code. Hmm. My position is, the default is &#8220;0s&#8221;, and in no other instance am I required to type the unit when specifying &#8220;0&#8243;, so why do I have to here? But who listens to me anyway?!</p>
<p>I happily added the stupid &#8220;s&#8221; and will definitely never make <em>that</em> mistake again&#8230; Oh, and I invoiced myself for several lost hours and frustration&#8230;! We&#8217;ll see if I pay the bill. ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.assortedgarbage.com/2011/08/the-importance-of-s-in-css3-transition-shorthand/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Best Tip Ever: Using Online CSS3 Tools In Dreamweaver</title>
		<link>http://blog.assortedgarbage.com/2011/05/using-online-css3-tools-in-dw/</link>
		<comments>http://blog.assortedgarbage.com/2011/05/using-online-css3-tools-in-dw/#comments</comments>
		<pubDate>Fri, 27 May 2011 10:25:50 +0000</pubDate>
		<dc:creator><![CDATA[Greg]]></dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Tech Tips]]></category>

		<guid isPermaLink="false">http://blog.assortedgarbage.com/?p=699</guid>
		<description><![CDATA[One of the coolest things about the development of CSS3 is all of the experimental sites and online tools being created to help us all learn the new syntax, properties, etc. There are literally tons of great ones like css3maker.com, John Allsopp&#8217;s  westciv tools, border-image.com, css3generator.com and many more. In fact, even Microsoft has gotten in [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>One of the coolest things about the development of CSS3 is all of the experimental sites and online tools being created to help us all learn the new syntax, properties, etc. There are literally tons of great ones like <a href="http://www.css3maker.com/">css3maker.com</a>, John Allsopp&#8217;s  <a href="http://www.westciv.com/tools/">westciv tools</a>, <a title="Border Image Maker" href="http://border-image.com/">border-image.com</a>, <a href="http://www.css3generator.com/">css3generator.com</a> and many more. In fact, even Microsoft has gotten in the game with their <a title="Follow the Progress of the Internet Explorer Platform" href="http://ie.microsoft.com/testdrive">test drive site</a> for IE 9 (and Preview Release of IE 10). But even with the great enhancements to <a title="Dreamweaver Feature Page" href="http://www.adobe.com/products/dreamweaver.html">Dreamweaver CS5.5</a>, using these tools still requires bouncing out to the browser, using the online tool and then copy/pasting the generated code back into your CSS in Dreamweaver – or does it?</p>
<p>Actually, one of the best features of Dreamweaver, Live View, can be used in a way that you might not have thought of. We know that Live View allows us to see the page, rendered by the embedded Webkit engine, exactly as it would appear in Webkit-based browsers. But there is also an interesting text field that becomes active in Live View at the top of the document window – an address field – just like in a browser!</p>
<p class="pic"><a href="http://blog.assortedgarbage.com/wp-content/2011/05/liveview-blank.jpg" rel="lightbox[699]"><img class="alignnone size-medium wp-image-703" title="Address Input Field" src="http://blog.assortedgarbage.com/wp-content/2011/05/liveview-blank-300x69.jpg" alt="The address field in Live View" width="300" height="69" /></a></p>
<p>And yes, you can type any URL into the field. Dreamweaver, just like the browser, will load the page in Live View. If you are in Split View mode, you might notice that the actual HTML from the page you are viewing is not there because Dreamweaver is still showing the code of your original page.</p>
<p class="pic"><a href="http://blog.assortedgarbage.com/wp-content/2011/05/LiveCode.jpg" rel="lightbox[699]"><img class="alignnone size-medium wp-image-714" title="Live Code" src="http://blog.assortedgarbage.com/wp-content/2011/05/LiveCode-300x282.jpg" alt="Live Code displaying the generated source" width="300" height="282" /></a></p>
<p>But click the Live Code button, and Dreamweaver will display the generated source of the page you are looking at — complete with all the corresponding CSS and Javascript files appearing in the related files bar. It&#8217;s a great way to learn from what others are doing.</p>
<p>To get the most out of this feature, I have simply created a &#8220;tools page&#8221; with links to all of my favorite online tools. In order to interact with your local tools page, you will need to choose &#8220;Follow Link&#8221; or, even better, &#8220;Follow Links Continuously&#8221; from the Live View Options menu.</p>
<p class="pic"><a href="http://blog.assortedgarbage.com/wp-content/2011/05/followlinks.jpg" rel="lightbox[699]"><img class="alignnone size-medium wp-image-704" title="Follow Links" src="http://blog.assortedgarbage.com/wp-content/2011/05/followlinks-300x235.jpg" alt="The follow links continuously command " width="300" height="235" /></a></p>
<p>So now, when I start Dreamweaver, I immediately open this page, turn on Live View, enable the Follow Links Continuously option and then go about working on my projects. Any time that I need a gradient, transition or anything more complex that I don&#8217;t want to &#8220;think about&#8221; how to create, I switch to my &#8220;tools page&#8221; tab where all my online friends are ready to help. I can then easily copy their code into the stylesheet that I am working on.</p>
<p class="pic"><a href="http://blog.assortedgarbage.com/wp-content/2011/05/liveview.jpg" rel="lightbox[699]"><img class="alignnone size-medium wp-image-705" title="Colorzilla in Live View" src="http://blog.assortedgarbage.com/wp-content/2011/05/liveview-300x253.jpg" alt="Live View rendering Colorzilla's Gradient Maker" width="300" height="253" /></a></p>
<p>Let me know what you think about this – or if you have an even better &#8220;Best Tip Ever&#8221;!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.assortedgarbage.com/2011/05/using-online-css3-tools-in-dw/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Dreamweaver CS5.5 — Wickedly Evolved!</title>
		<link>http://blog.assortedgarbage.com/2011/04/dreamweaver-wickedly-evolved/</link>
		<comments>http://blog.assortedgarbage.com/2011/04/dreamweaver-wickedly-evolved/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 04:01:23 +0000</pubDate>
		<dc:creator><![CDATA[Greg]]></dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[CS5]]></category>
		<category><![CDATA[CS5.5]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[phonegap]]></category>

		<guid isPermaLink="false">http://blog.assortedgarbage.com/?p=656</guid>
		<description><![CDATA[Like the sun rising in the east, every time a new version of a product is rolled out, the marketing machine proclaims this to be the &#8220;best version ever&#8221;! Well, having had the luxury of being involved with Dreamweaver since the very beginning, I can honestly tell you that Dreamweaver CS5.5 is not just a [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Like the sun rising in the east, every time a new version of a product is rolled out, the marketing machine proclaims this to be the &#8220;best version ever&#8221;! Well, having had the luxury of being involved with Dreamweaver since the very beginning, I can honestly tell you that <a href="http://adobe.com/dreamweaver/">Dreamweaver CS5.5</a> is not just a point release on top of CS5 — it truly is the <strong>best version ever</strong>! Along with addressing bugs (face it, every piece of software has bugs) the Dreamweaver team has taken on the challenge of keeping up with the evolving web industry, specifically around enhanced HTML5/CSS3 support, and the move toward multi-screen authoring, both from a &#8220;mobile optimized&#8221; approach using CSS3 media queries, as well as embracing the jQuery Mobile framework. Finally, the ability to wrap HTML/CSS/JS up into a native iOS and/or <a title="Android" href="http://www.android.com/">Android</a> application using the <a title="Phonegap" href="http://phonegap.com">Phonegap framework</a> is sure to be a &#8220;crowd pleaser&#8221;.</p>
<h3>HTML5 / CSS3</h3>
<p>For those that missed it, shortly after the release of Dreamweaver CS5, the team released an update on <a title="Adobe Labs" href="http://labs.adobe.com">Adobe Labs</a> which provided initial code-hinting support for <a title="HTML 5 Spec" href="http://dev.w3.org/html5/spec/Overview.html">HTML5</a> and CSS3. This was later baked into an update to the core product. With Dreamweaver CS5.5, the team has updated the code-hinting database to reflect the current state of the HTML5 elements, as well as updating the WebKit browser engine embedded into Dreamweaver&#8217;s Live View. This means that things like native HTML5 video can be &#8220;seen&#8221;, but also interacted with while you are designing your page.</p>
<p class="pic"><a href="http://blog.assortedgarbage.com/wp-content/2011/04/LiveView.jpg" rel="lightbox[656]"><img class="alignnone size-medium wp-image-665" title="Live View of Native Video" src="http://blog.assortedgarbage.com/wp-content/2011/04/LiveView-300x193.jpg" alt="Live View of Native Video" width="300" height="193" /></a></p>
<p>For the CSS3 aficionados, you might remember that the HTML5/CSS3 update last year added support for vendor-specific prefixes. This meant that you could type a dash, and Dreamweaver would codehint &#8220;-moz-&#8221;, &#8220;-o-&#8221; and &#8220;-webkit&#8221;-&#8221;. Choosing one of the vendor-specific prefixes would then in turn display a list the list of CSS properties that that specific prefix could be used with. Dreamweaver CS5.5 not only continues this functionality, a fourth vendor-specific prefix has been added, &#8220;-ms-&#8221;, because now Internet Explorer 9 has adopted its own prefix.</p>
<p class="pic"><a href="http://blog.assortedgarbage.com/wp-content/2011/04/mshint.jpg" rel="lightbox[656]"><img class="alignnone size-medium wp-image-666" title="Code Hinting Vendor Prefixes" src="http://blog.assortedgarbage.com/wp-content/2011/04/mshint-300x172.jpg" alt="Code Hinting Vendor Prefixes" width="300" height="172" /></a></p>
<p>Additionally, the CSS Panel has been updated with a couple of very nice enhancements. First, the dropdown list now includes all of the new CSS3 properties and any vendor-specific properties that you may have added to your rule show up in the assigned properties list for easy editing. Second, new fly-out dialogs have been added to allow you to quickly specify values for box shadow, text shadow and border radius. Finally, the color picker has been updated to support the RGBa and HSLa color spaces — and even translate between hexadecimal values and these new color spaces.</p>
<p class="pic"><a href="http://blog.assortedgarbage.com/wp-content/2011/04/csspanel.jpg" rel="lightbox[656]"><img class="alignnone size-medium wp-image-667" title="CSS Panel" src="http://blog.assortedgarbage.com/wp-content/2011/04/csspanel-268x300.jpg" alt="CSS3 Support in the CSS Panel" width="268" height="300" /></a></p>
<p>The Multiscreen Preview which was added with the HTML5 update, has also been improved and now eases the process of creating media queries and their attached stylesheet files. But taking the idea one step further, the Window Size manager (a long forgotten Dreamweaver feature) now includes the ability to change the Design View and Live View to reflect only the desired stylesheet. Yes, this means that you can continue to work, modifying HTML, CSS and Javascript, while looking at the way the page will actually look under various scenarios! If you are serious about targeting multiple screen sizes/dimensions with CSS, this feature will have you cheering!</p>
<h3>jQuery Mobile</h3>
<p>And if you are into targeting mobile devices, the <a title="jQuery Mobile Framework" href="http://jquerymobile.com">jQuery Mobile framework</a> helps ease the process of creating mobile-optimized pages that actually &#8220;feel&#8221; like a native application. As a proud sponsor of the jQuery Mobile project, the Dreamweaver team has been actively contributing back to the framework. And Dreamweaver is all the better for it, as Dreamweaver CS5.5 adds a jQuery Mobile widget section to the Insert Panel, allowing you to easily add UI widgets from the framework to your page — and getting started is just as easy with the new jQuery Mobile starter layout. Use the Window Size manager to set your Design/Live View to the size of a mobile phone and it&#8217;s as if you are almost working on the phone itself.</p>
<p>And speaking of jQuery in general, Dreamweaver CS5.5 builds upon the enhanced Javascript code-hinting introduced in the previous version by providing intelligent code-hinting for the <a title="jQuery Framework - Do More. Write Less." href="http://jquery.com">full jQuery framework</a>.</p>
<p class="pic"><a href="http://blog.assortedgarbage.com/wp-content/2011/04/jquerymobile.jpg" rel="lightbox[656]"><img class="alignnone size-medium wp-image-668" title="jQuery Mobile Widgets" src="http://blog.assortedgarbage.com/wp-content/2011/04/jquerymobile-300x273.jpg" alt="Insert jQuery Mobile widgets directly into the page" width="300" height="273" /></a></p>
<h3>Phonegap</h3>
<p>Having spent the last six or so months attending conferences featuring talks about native application development with HTML/CSS/JS, I can personally attest to the popularity of the Phonegap framework. This simple, yet powerful, framework is there to solve one simple problem, the actual packaging of your HTML, CSS and Javascript into a native application for iOS and Android devices. And Dreamweaver CS5.5 includes built-in access to the framework — meaning, once you have your application looking and functioning like you want, a simple command in Dreamweaver can pass the entire &#8220;site&#8221; off to the Phonegap framework, packaging it up for deployment, or, if you&#8217;re in the middle of development, you can interact with your application using the iOS or Android simulators included in the respective platforms&#8217; SDK.</p>
<p class="pic"><a href="http://blog.assortedgarbage.com/wp-content/2011/04/phonegap2.jpg" rel="lightbox[656]"><img class="alignnone size-medium wp-image-669" title="Native Apps with the Phonegap framework" src="http://blog.assortedgarbage.com/wp-content/2011/04/phonegap2-300x198.jpg" alt="Native Apps with the Phonegap framework" width="300" height="198" /></a></p>
<h3>Read more, see more</h3>
<p>I have to admit that I&#8217;ve been looking forward to finally being able to show this wickedly evolved version of Dreamweaver off in public! And, that&#8217;s what I will be doing quite a lot over the coming months. Together with my good friends and colleagues, Terry White, Jason Levine and Paul Trani, I will be on tour around the world throughout the rest of April, May and June. You can see dates in the right hand column of this blog — or, read more about the tour and get registered on our <a title="Creative Suite 5.5 Live on tour" href="http://www.cs5evolutiontour.com/">Creative Suite Evolution Tour page</a>. If you can&#8217;t make it to one of our tour stops, I&#8217;ve also recorded<a title="What's New in Dreamweaver CS5.5" href="http://tv.adobe.com/go/9283"> a series of videos</a> showing off all the shiny new features.</p>
<p>Of course, this release is not just about Dreamweaver — there&#8217;s new stuff for Flash developers, video and audio professionals, as well as some wickedly cool developments in the InDesign world. So, be sure to check out <a title="Terry's Tech Blog" href="http://terrywhite.com/techblog/archives/7490">Terry&#8217;s blog</a> to get up to speed on publishing from InDesign to tablets. Jason will be spreading <a title="Jason's Video and Audio Blog" href="http://boodahjoomusic.com/blog/?p=440&amp;preview=true">all of the new video and audio love</a> (any Audition fans out there on the Mac platform?), and Paul will be sharing all <a title="What's New in Flash" href="http://tv.adobe.com/go/9200">the new developments around Flash</a> and how this version is raising the bar on multi-screen development for applications and games.</p>
<p>As always, be sure to visit <a title="Dreamweaver's Home on the Web" href="http://adobe.com/products/dreamweaver/">Dreamweaver&#8217;s home on Adobe.com</a> for a complete list of features, as well as pricing and upgrade information.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.assortedgarbage.com/2011/04/dreamweaver-wickedly-evolved/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>CSS3 Media Queries? Download Answers</title>
		<link>http://blog.assortedgarbage.com/2010/12/css3-media-queries-download-answers/</link>
		<comments>http://blog.assortedgarbage.com/2010/12/css3-media-queries-download-answers/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 18:55:12 +0000</pubDate>
		<dc:creator><![CDATA[Greg]]></dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Tech Tips]]></category>

		<guid isPermaLink="false">http://blog.assortedgarbage.com/?p=564</guid>
		<description><![CDATA[I&#8217;ve read a number of articles about the best approach for delivering content to mobile devices using CSS3 Media Queries, including Ethan&#8217;s article at A List Apart. While the general consensus seems to be &#8220;be careful&#8221;, I decided to do some testing of my own. Of course this &#8220;be careful&#8221; attitude is because, done incorrectly, you can [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve read a number of articles about the best approach for delivering content to mobile devices using CSS3 Media Queries, including <a title="A List Apart: Responsive Web Design" href="http://www.alistapart.com/articles/responsive-web-design/">Ethan&#8217;s article at A List Apart</a>. While the general consensus seems to be &#8220;be careful&#8221;, I decided to do some testing of my own. Of course this &#8220;be careful&#8221; attitude is because, done incorrectly, you can cause a mobile device to download much more than you think. Oh, and there&#8217;s also the problem of that pesky Internet Explorer thingy&#8230; The question that I wanted answered is simply &#8220;<em>what does a mobile device download when encountering a page using media queries?</em>&#8221;</p>
<p>First, I created <a href="http://assortedgarbage.com/presario/mq-test.html">a simple page</a> that contains a few boxes (list elements styled with CSS). In addition to text, one of the boxes contains<span id="more-564"></span> an image that I used for a subsequent test. The page also has a background image that I want to swap out when the viewport changes orientation. The CSS to make that happen looks like this (other irrelevant code omitted):</p>
<div class="code">
<pre>@media screen and (orientation:landscape) {
body {
background: url(img/oia.jpg) no-repeat top center;
}
}
@media screen and (orientation:portrait) {
body {
background: url(img/nighttime.jpg) no-repeat top center;
}
}</pre>
</div>
<p>For the purists among you, you&#8217;ll notice that I have (intentionally) omitted device-width and/or min/max-widths so that I could see if desktop browsers, responding to the media query, reacted in the same way as the mobile devices. For the initial test, I left the CSS in the HTML page itself. In a follow-up test, we will see what effects, if any, moving the code to externally linked stylesheets has on the downloads.</p>
<p>In order to be sure I captured every server request, I turned on logging on my <a title="MAMP: Mac, Apache, MySQL, PHP" href="http://www.mamp.info/en/index.html">MAMP</a> server and opened a console to watch the results of what is actually being served. Making sure that all browser caches have been emptied, I requested the page using my desktop browser (Chrome) set to the standard, somewhat wide, width that I use to surf.</p>
<p class="pic"><a href="http://blog.assortedgarbage.com/wp-content/2010/12/mq-01.jpg" rel="lightbox[564]"><img class="alignnone size-full wp-image-574" title="Media Query Test" src="http://blog.assortedgarbage.com/wp-content/2010/12/mq-01.png" alt="" width="425" height="319" /></a></p>
<p>The browser requested the HTML page, along with the background image called for by the landscape media query and the image placed in the page. After setting a marker in the log, I then resized the browser window to a portrait aspect. This resulted in the browser only requesting the background image needed for the portrait media query.</p>
<p class="note">Note: I later tested what happens if a background image is assigned in the global styles, ie without a media query,  and is subsequently overridden in the appropriate media query. I found that WebKit-based browsers (<a title="Safari 5" href="http://www.apple.com/safari/">Safari</a> and <a title="Get the latest Chrome browser" href="http://www.google.com/chrome/">Chrome</a>) download the initially defined background image as well as the background image to be applied by the media query. <a title="Get Firefox" href="http://www.mozilla.com/en-US/firefox/firefox.html">Firefox</a> and <a title="Opera Software" href="http://www.opera.com/">Opera</a> ignored the overridden background image.</p>
<p>This had me really excited, because it would seem to indicate that devices would only download what they needed for a given situation.</p>
<h3>Now on to some devices for testing&#8230;</h3>
<p>The little device lab that I&#8217;ve accumulated is made up of an <a title="Apple iPad" href="http://www.apple.com/ipad/">iPad</a> (running iOS 4.2.1), an iPhone 3G (also running the latest OS), Samsung <a title="The Samsung Galaxy Tablet" href="http://www.samsung.com/us/mobile/galaxy-tab">Galaxy Tab</a>, Motorola Droid 2, Samsung Desire HD, Blackberry Torch and a Nexus One. After testing the page with every device, I was (happily) surprised to find the exact same behavior exhibited by the desktop browser. Each of the devices only downloaded the background image for the orientation in which they found themselves when the page was requested.</p>
<p class="note">Note: This was especially difficult to test on the iPad, as it seems it is overly agressive about caching background images. I repeatedly chose the &#8220;Clear Cache&#8221; option, only to have the iPad not request the image from the server. It appears that you must clear the cache and then reboot in order to truly clear the cache.</p>
<p>The next test involved moving the body rules into two separate stylesheets.</p>
<div class="code">
<pre>&lt;link href="css/landscape.css" rel="stylesheet" type="text/css" media="only screen and (orientation:landscape)"&gt;
&lt;link href="css/portrait.css" rel="stylesheet" type="text/css" media="only screen and (orientation:portrait)"&gt;</pre>
</div>
<p>Once again, only the image needed for the current orientation was requested from the server for all devices (including the desktop browser). However, all of the devices downloaded both stylesheets. Of course, this made sense because all of the devices are &#8220;capable&#8221; of both a landscape and portrait orientation.</p>
<p>The next logical question would be, does a device request a stylesheet if there is no possible way that it would need it? To determine this, I changed the parameters for the portrait.css file.</p>
<div class="code">
<pre>&lt;link href="css/portrait.css" rel="stylesheet" type="text/css" media="only screen and (orientation:portrait) and (max-width:700px)"&gt;</pre>
</div>
<p>You&#8217;ll notice that I specified a max-width of 700px. This way I could sure that the iPad (with a width of 768px in portrait mode) could not possibly need the stylesheet, while all of the other mobile devices in my test would need it. The result was the same as before — all of the devices, including the iPad, downloaded every single stylesheet, regardless of whether or not it could actually &#8220;use&#8221; the rules within. I played with several different values, even providing values that didn&#8217;t work for any of the devices, and yet, they all still downloaded every stylesheet.</p>
<h3>Are you sure you want to display:none?</h3>
<p>During my research, I also got to wondering about the use of display:none. I knew that images (or other content for that matter) would still download to the client even if it was set to display:none. This makes sense, because we often see display:none used to show/hide content in a page &#8211; and display:none just &#8220;hides&#8221; the content, it doesn&#8217;t remove it from the DOM. Well, or so I thought&#8230;</p>
<p>In testing, it turns out that even an image in the page, ie contained within the HTML not the CSS, is not downloaded in Firefox and Opera if its parent element is set to display:none in the applicable stylesheet. In Chrome and Safari, however, the image is still downloaded, regardless.</p>
<p>Basically, all of the mobile devices tested exhibit the Chrome/Safari behavior when using their WebKit-based browsers, which makes sense. On Android devices, Opera Mobile also exhibited the same behavior as its desktop counterpart.</p>
<h3>At least now I know</h3>
<p>If all of this leaves you scratching your head, join the club! But really, it&#8217;s quite simple. The thing to remember is that all of your stylesheets will be downloaded no matter what. Background images in rules that do not apply to a given device/situation will not download, so you don&#8217;t have to worry about eating a person&#8217;s mobile data plan up with your 12 megapixel background image! ;-) But remember that images which are in &#8220;perfectly good rules&#8221; that are overridden later in the cascade <strong>do</strong> download in WebKit-based browsers — even the mobile versions.</p>
<p>The other takeaway, of course, is not to rely upon display:none to hide image content from mobile devices.</p>
<p>And finally, remember that all of this goodness is only for standards-compliant browsers. For Internet Explorer 6/7/8, you&#8217;ll still need to do the IECC dance. I would assume this also applies to the Windows Mobile 7 browser, as it is based upon a combination of 7 and 8. Sadly, no one has sent me one of those phones to test&#8230; Anyone? Bueller?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.assortedgarbage.com/2010/12/css3-media-queries-download-answers/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Using CSS3 with Dreamweaver CS5</title>
		<link>http://blog.assortedgarbage.com/2010/06/using-css3-with-dreamweaver-cs5/</link>
		<comments>http://blog.assortedgarbage.com/2010/06/using-css3-with-dreamweaver-cs5/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 16:00:16 +0000</pubDate>
		<dc:creator><![CDATA[Greg]]></dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Creative Suite]]></category>
		<category><![CDATA[CS5]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Dreamweaver]]></category>

		<guid isPermaLink="false">http://blog.assortedgarbage.com/?p=484</guid>
		<description><![CDATA[While I truly am excited by the new semantic elements in HTML5, as well as the possibilities that things like local storage will do for expanding the capabilities of websites, I have to admit that I&#8217;m really much more excited by the shiny new toys in CSS3. And, of course, with the recently released HTML5 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>While I truly am excited by the new semantic elements in <a title="HTML5 Specification" href="http://www.w3.org/TR/2010/WD-html5-20100304/">HTML5</a>, as well as the possibilities that things like local storage will do for expanding the capabilities of websites, I have to admit that I&#8217;m really much more excited by the <a title="CSS3 Specifications" href="http://www.w3.org/TR/css3-roadmap/">shiny new toys in CSS3</a>. And, of course, with the recently released <a title="Download the HTML5 pack for Dreamweaver CS5" href="http://labs.adobe.com/technologies/html5pack/">HTML5 pack for Dreamweaver CS5</a>, I no longer have to &#8220;try&#8221; to remember the new CSS3 properties &#8211; I get them all with lovely code-hinting and code-completion right within Dreamweaver CS5.</p>
<p>In the following video, I show you how to use some of the really popular new properties &#8211; like using border-radius to add rounded corners, transform to rotate elements and transitions to create the illusion of an animated rollover.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/pf-BPgOOFmU&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/pf-BPgOOFmU&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>There is a definite caveat that I want to make sure to mention &#8211; since CSS3 (and HTML5, of course) is still being developed, not all of the CSS3 properties are available in Dreamweaver CS5 (and in Live View some properties do not render). But even with that caveat, Dreamweaver CS5 now really rocks with CSS3. And again, if you&#8217;ve not looked at Dreamweaver lately, you can always<a title="Dreamweaver trial" href="http://bit.ly/tryCS5DW_Ev"> download a 30-day trial</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.assortedgarbage.com/2010/06/using-css3-with-dreamweaver-cs5/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Dreamweaver CS5 and HTML5</title>
		<link>http://blog.assortedgarbage.com/2010/06/dreamweaver-cs5-and-html5/</link>
		<comments>http://blog.assortedgarbage.com/2010/06/dreamweaver-cs5-and-html5/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 14:00:41 +0000</pubDate>
		<dc:creator><![CDATA[Greg]]></dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Creative Suite 5]]></category>
		<category><![CDATA[CS5]]></category>
		<category><![CDATA[Dreamweaver]]></category>

		<guid isPermaLink="false">http://blog.assortedgarbage.com/?p=472</guid>
		<description><![CDATA[Unless you&#8217;ve been living under a rock, you know the underlying language of the web, HTML, has begun to (finally) evolve once again with the browsers slowly beginning to support pieces of HTML5 and CSS3. With the release of Dreamweaver CS5, the world&#8217;s leading web authoring tool has made huge strides in embracing the evolution [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Unless you&#8217;ve been living under a rock, you know the underlying language of the web, HTML, has begun to (finally) evolve once again with the browsers slowly beginning to support pieces of HTML5 and CSS3. With the release of Dreamweaver CS5, the world&#8217;s leading web authoring tool <a title="What's New in Dreamweaver CS5" href="http://www.adobe.com/products/dreamweaver/whatsnew/">has made huge strides</a> in embracing the evolution of the web, providing an unparalleled ability to style themes for any PHP-based CMS system (WordPress, Drupal and Joomla out of the box, as well as home-grown PHP-based systems). However, for those who have already upgraded and who want to leverage HTML5 and CSS3, you&#8217;ve no doubt found that the only &#8220;apparent&#8221; support for HTML5 in Dreamweaver CS5 is the addition of the HTML5 doctype in the New Document dialog. But now, that&#8217;s all changed!</p>
<p>During the <a title="Google I/O Conference keynote video" href="http://www.youtube.com/watch?v=Sqw3nrTV92c&amp;feature=related">keynote session at the Google I/O Conference</a> in San Francisco, Adobe&#8217;s CTO, Kevin Lynch, demonstrated an extension to Dreamweaver CS5 which not only adds the new HTML5 semantic elements, but also properties for CSS3, to the authoring environment. With this addition, Dreamweaver CS5 users are provided with code hinting for HTML5 and CSS3 in Code View.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/vabpQhJD3FA&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/vabpQhJD3FA&amp;hl=en&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Of course, <a title="HTML5 Specification" href="http://www.w3.org/TR/2010/WD-html5-20100304/">HTML5</a> and <a title="CSS3 Roadmap" href="http://www.w3.org/TR/css3-roadmap/">CSS3</a> are not &#8220;finished&#8221; yet, and as such, the team can&#8217;t &#8220;know&#8221; what&#8217;s going to be in the final specification. Therefore, the extension provides support for the elements and properties that are &#8220;the most complete&#8221; at this time. In other words, the elements and properties that, <span id="more-472"></span>not only appear to be &#8220;mature&#8221; in the W3C specifications, but that are also gaining support among the browser makers. To this end, basic code hinting support is provided for these CSS3 properties specific to individual browsers (-moz, -webkit and -o).</p>
<p>As a page comes together from the code perspective, it&#8217;s also important that we see how that code is being rendered, and this is an area that Dreamweaver has truly shined over the last several releases with its Live View feature (an implementation of WebKit). And with the new extension, the underlying engine of Live View gets an overhaul to allow for the rendering of these new semantic elements, including the much hyped <a title="HTML5 Video example" href="http://www.w3.org/2010/05/video/mediaevents.html">&lt;video&gt;</a> and &lt;audio&gt; elements, along with rendering support for some of the most common CSS3 properties.</p>
<p>And for those looking for a little help in getting started, the extension adds a few new layouts to the CSS Starter Layouts (File&gt;New) which have been marked up with the new HTML5 semantics.</p>
<p>Of course, there&#8217;s still work to be done &#8211; and rest assured, as Lea Hickman points out in <a title="Adobe Supports HTML5 - New York Times" href="http://bits.blogs.nytimes.com/2010/05/19/adobe-begins-offering-new-html5-software-tools/">an article in the New York Times</a>, the Dreamweaver team is hard at work and laser-focused on creating the best environment for HTML5 and CSS3 development. Stay tuned for more news and updates as they become available. And if you haven&#8217;t already done so, download the <a title="Dreamweaver Trial download" href="http://bit.ly/tryCS5DW_Ev">Dreamweaver CS5 trial</a> for yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.assortedgarbage.com/2010/06/dreamweaver-cs5-and-html5/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
