<?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>zomigi.com &#187; CSS</title>
	<atom:link href="http://zomigi.com/tags/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://zomigi.com</link>
	<description>The professional blog of Zoe Mickley Gillenwater</description>
	<lastBuildDate>Wed, 23 Nov 2011 13:48:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Media queries presentation at indieconf</title>
		<link>http://zomigi.com/blog/media-queries-presentation/</link>
		<comments>http://zomigi.com/blog/media-queries-presentation/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 16:30:40 +0000</pubDate>
		<dc:creator>Zoe Gillenwater</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[flexible]]></category>
		<category><![CDATA[Flexible Web Design]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[liquid]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[responsive web design]]></category>
		<category><![CDATA[speaking]]></category>
		<category><![CDATA[Stunning CSS3]]></category>

		<guid isPermaLink="false">http://zomigi.com/?p=621</guid>
		<description><![CDATA[Download the slides for my presentation on CSS3: Using Media Queries to Improve the Web Site Experience for indieconf, as well as get links to related resources on media query techniques, tools, and inspiration.]]></description>
			<content:encoded><![CDATA[<p>Today I had the pleasure of speaking at <a href="http://www.indieconf.com/">indieconf</a>, a conference for independent web developers and designers, right here in my backyard of Raleigh, NC. I talked about the basics of CSS3 media query syntax but focused on the challenges and considerations that go into building a site from scratch with media queries to power the layout. I used the fictional <a href="http://stunningcss3.com/code/bakery/index.html">Little Pea Bakery</a> site from my book <a href="http://stunningcss3.com/"><em>Stunning CSS3</em></a> as a demo for how to adapt the CSS to make better use of the space at different viewport widths. I covered some tips for making your design work on mobile devices and even old versions of IE.</p>
<p>You can view the slides on <a href="http://www.slideshare.net/zomigi/css3-using-media-queries-to-improve-the-web-site-experience">SlideShare</a>, or download the slides here:</p>
<p><a href="/downloads/CSS3-Media-Queries_indieconf_111119.pdf">CSS3: Using media queries to improve the web site experience (PDF, 2.4 mb)</a></p>
<p>Here are several links to related resources, some of which are in the  slides plus many that were not but which I recommend and think you&#8217;ll  find useful.</p>
<h3>Media query articles, tutorials, and tools</h3>
<ul>
<li>&#8220;<a href="http://zomigi.com/blog/essential-considerations-for-crafting-quality-media-queries/">Essential considerations for crafting quality media queries</a>&#8221; by me</li>
<li><a href="http://stunningcss3.com/samples/index.html">Excerpt of Chapter 6 of Stunning CSS3 on media queries</a> by me</li>
<li>&#8220;<a href="http://artequalswork.com/posts/target-first.php">Design for a Target Experience First</a>&#8221; by Nathan C. Ford</li>
<li><a href="http://www.goldilocksapproach.com/">The Goldilocks Approach</a> by Front design agency</li>
<li>&#8220;<a href="http://www.netmagazine.com/features/21-top-tools-responsive-web-design">21 top tools for  responsive web design</a>&#8221; by Denise Jacobs for .net Magazine</li>
<li>&#8220;<a href="http://www.smashingmagazine.com/responsive-web-design-guidelines-tutorials/">Responsive Web Design Guidelines and Tutorials</a>&#8221; by Smashing Magazine</li>
<li>&#8220;<a href="http://dev.opera.com/articles/view/an-introduction-to-meta-viewport-and-viewport/">An introduction to meta viewport and @viewport</a>&#8221; by Andrea Bovens for Dev.Opera</li>
<li>&#8220;<a href="http://www.alaress.com.au/2011/04/developing-for-high-dpi-devices/">Why images appear blurry on mobile devices</a>&#8221; by Christopher Cohen</li>
</ul>
<p><span id="more-621"></span></p>
<h3>Dealing with IE 6-8 support</h3>
<ul>
<li><a href="https://github.com/scottjehl/Respond">Respond</a> script by Scott  Jehl</li>
<li><a href="http://code.google.com/p/css3-mediaqueries-js/">css3-mediaqueries.js</a> script by Wouter van der Graaf</li>
<li>“<a href="http://adactio.com/journal/4494/">Windows mobile media queries</a>” by Jeremy Keith</li>
<li>&#8220;<a href="http://blogs.msdn.com/b/iemobile/archive/2010/12/08/targeting-mobile-optimized-css-at-windows-phone-7.aspx">Targeting mobile-optimized CSS at Windows Phone 7</a>&#8221; by IE Mobile Team</li>
</ul>
<h3>Fluid/liquid layout</h3>
<ul>
<li><a href="http://flexiblewebbook.com/"><em>Flexible Web Design: Creating Liquid and Elastic Layouts with CSS</em></a> book by me</li>
<li>&#8220;<a href="../blog/essential-resources-for-creating-liquid-and-elastic-layouts/">70+ essential resources for creating liquid and elastic layouts</a>&#8221; by me</li>
</ul>
<h3>Media query inspiration</h3>
<ul>
<li><a href="http://mediaqueri.es/">Mediaqueri.es</a> gallery</li>
<li>My media query inspiration bookmarks on <a href="http://delicious.com/pixelsurge/mediaqueries+nicedesign">delicious</a> and <a href="https://gimmebar.com/loves/zomigi/tag/mediaqueries">Gimmebar</a></li>
<li>My liquid layout inspiration bookmarks on <a href="http://delicious.com/pixelsurge/liquid+nicedesign">delicious</a> and <a href="https://gimmebar.com/loves/zomigi/tag/liquid">Gimmebar</a></li>
<li>&#8220;<a href="http://zomigi.com/blog/examples-of-flexible-layouts-with-css3-media-queries/">Examples of flexible layouts with CSS3 media queries</a>&#8221; by me</li>
</ul>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://zomigi.com/blog/essential-considerations-for-crafting-quality-media-queries/' title='Essential considerations for crafting quality media queries'>Essential considerations for crafting quality media queries</a></li>
<li><a href='http://zomigi.com/blog/theres-already-a-book-on-responsive-web-design-want-to-win-it/' title='There&#8217;s already a book on responsive web design. Want to win it?'>There&#8217;s already a book on responsive web design. Want to win it?</a></li>
<li><a href='http://zomigi.com/blog/examples-of-flexible-layouts-with-css3-media-queries/' title='Examples of flexible layouts with CSS3 media queries'>Examples of flexible layouts with CSS3 media queries</a></li>
<li><a href='http://zomigi.com/blog/adobe-max/' title='Adobe MAX slides and resources'>Adobe MAX slides and resources</a></li>
<li><a href='http://zomigi.com/blog/web-directions-usa/' title='Web Directions USA slides and resources'>Web Directions USA slides and resources</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://zomigi.com/blog/media-queries-presentation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Essential considerations for crafting quality media queries</title>
		<link>http://zomigi.com/blog/essential-considerations-for-crafting-quality-media-queries/</link>
		<comments>http://zomigi.com/blog/essential-considerations-for-crafting-quality-media-queries/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 15:00:40 +0000</pubDate>
		<dc:creator>Zoe Gillenwater</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[media queries]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[responsive web design]]></category>
		<category><![CDATA[work process]]></category>

		<guid isPermaLink="false">http://zomigi.com/?p=569</guid>
		<description><![CDATA[Learn what you need to know to set up media queries that maximize efficiency and robustness for your particular project. There are pros and cons to making your media queries embedded versus external, overlapping versus stacking your media queries, starting with mobile versus desktop styles, and using conditional comments versus JavaScript to add support for IE 8 and earlier versions.]]></description>
			<content:encoded><![CDATA[<p>CSS3 media queries are dead simple, in terms of their syntax. You&#8217;ve got an <code>@media</code> directive, a media type (which you already know from good ol&#8217; CSS 2, like <code>screen</code>, <code>print</code>, <code>all</code>, etc.) and one or more media features (the characteristics we&#8217;re testing against). That&#8217;s it:</p>
<pre><code>@media screen and (max-width:500px) {
}</code></pre>
<p>There are some additional little syntax details, but this is basically all you need to know to actually make a media query work. Once you memorize this short, simple syntax and the various media features that are available, you could technically say that you know how to use media queries. But knowing how to use media queries <em>effectively</em> requires a whole lot more considerations than just where to put an @ or {.</p>
<p>Designing web layouts with media queries is a <em>process</em>. You need to keep them in mind from the very beginning and make decisions at several points about how to integrate them in ways that will make the most sense for your site. There are very few always-right or always-wrong answers. What type of media query set-up would work best will depend on your site, your users, and your own capabilities and experience. But I wanted to cover the pros and cons of some of the essential considerations that go into crafting robust media query-driven layouts. These considerations include whether to:</p>
<ul>
<li><a href="#mq-embed-external">Make the media queries embedded or external</a></li>
<li><a href="#mq-overlap-stack">Overlap or stack your media queries</a></li>
<li><a href="#mq-default-styles">Make mobile or desktop styles the default</a></li>
<li><a href="#mq-internet-explorer">Use conditional comments or JavaScript to add support for IE 8 and earlier versions</a></li>
</ul>
<p>This article is just as much for me as it is for you—it can be hard to keep track of all the different configuration variations you can use! Hopefully I&#8217;ll be able to make the pros and cons of the various approaches clearer so you can use this article to guide your decisions when you start a project involving media queries.</p>
<h3 id="mq-embed-external">How to include your media queries: embedded vs. external</h3>
<p>There are two ways to include media queries in your site: embed them within a style sheet or include them in a call to a separate, external sheet.</p>
<p><span id="more-569"></span>Here&#8217;s what an embedded media query looks like (pretend that we&#8217;re inside a style sheet):</p>
<pre><code>body {
    background: gray;
}
@media all and (max-width:500px) {
    body {
        background: blue;
    }
}</code></pre>
<p>For an external media query, simply extend the existing media part of the <code>link</code> element or <code>@import</code> rule:</p>
<pre><code>&lt;link href="narrow.css" rel="stylesheet" media="only screen and (max-width:500px)"&gt;</code></pre>
<pre><code>@import url(narrow.css) only screen and (max-width:500px);</code></pre>
<p>Browsers that don&#8217;t support media queries won&#8217;t download these sheets, but browsers that do will download them all, regardless of whether they&#8217;re needed or not for the current viewing scenario. (The background images inside the currently-not-needed sheets won&#8217;t download, however.) On the one hand, this makes sense—the user could change his or her orientation or window size, and those alternate styles would suddenly need to be called into action.  On the other hand, <a href="http://blog.assortedgarbage.com/2010/12/css3-media-queries-download-answers/">Greg Rewis found</a> that even if you create a sheet that it seems like a device could never possibly use, such as a sheet for a <code>max-width</code> of 700 pixels never being needed by an iPad with its 768 x 1024 resolution, the device will download it anyway. But <a href="http://css-tricks.com/">Chris Coyier</a> pointed out to me that you could have an <code>iframe</code> in a page, for instance, that might need to use that smaller style sheet—so on the <em>third</em> hand, I guess this behavior is logical and unavoidable, if not perfect.</p>
<h4>The pros and cons</h4>
<table class="pros-cons">
<caption> Embedded vs external media queries<br />
</caption>
<tbody>
<tr>
<th class="pro" scope="col">Embedded pros</th>
<th class="con" scope="col">External cons</th>
</tr>
<tr>
<td class="pro">No extra HTTP request(s)</td>
<td class="con">Extra HTTP request(s)</td>
</tr>
<tr>
<td class="pro">Not out of sight, so harder to forget</td>
<td class="con">Out of sight, so could be forgotten when updating</td>
</tr>
</tbody>
</table>
<table class="pros-cons">
<caption> Embedded vs external media queries<br />
</caption>
<tbody>
<tr>
<th class="con" scope="col">Embedded cons</th>
<th class="pro" scope="col">External pros</th>
</tr>
<tr>
<td class="con">Extra kb in file size for everyone to download whether query used or not</td>
<td class="pro">Smaller file size for default sheet used by browsers that don&#8217;t support media queries</td>
</tr>
<tr>
<td class="con">Have to use JavaScript to make it work in IE 8 and earlier<span>*</span></td>
<td class="pro">Can feed one of the queries to IE using conditional comments<span>*</span></td>
</tr>
<tr>
<td class="con">Harder to keep organized if CSS extensive</td>
<td class="pro">Easier to keep organized if CSS extensive</td>
</tr>
</tbody>
</table>
<p id="note-ie">* I&#8217;ll go into the details of both of these approaches to <a href="#mq-internet-explorer">dealing with old versions of IE later on in this article</a>, so sit tight if this IE stuff doesn&#8217;t make sense just yet.</p>
<h4>The bottom line</h4>
<p>In most situations, I think that embedded is the better way to go. I&#8217;ve never been a fan of separating out styles into separate sheets because I find it harder to keep things organized and easier to forget those extra sheets when debugging or updating. Plus, it adds extra HTTP requests, which are more expensive in terms of performance than having a single sheet that&#8217;s larger in file size. Because media-query-supporting browsers will download those extra sheets even they don&#8217;t currently need them, the smaller file size that you gain by separating the media queries into their own sheets is really only a benefit to browsers that don&#8217;t support media queries, as they won&#8217;t download those extra media query sheets.</p>
<p>But again—and this is the last time I&#8217;m saying this, but it applies to everything in this article—the best approach <a href="http://adactio.com/journal/4437/">depends</a> on your project.</p>
<h3 id="mq-overlap-stack">How to use the cascade: overlapping vs. stacked</h3>
<p>Regardless of whether you make your media queries embedded or external, you also need to decide whether you want them to overlap, bringing the cascade and specificity into play, or whether you want to &#8220;stack&#8221; them so only one media query applies at once.</p>
<p>Here&#8217;s what overlapping media queries look like (this example is embedded, but the same could be done with external sheets):</p>
<pre><code>body {
    background: gray;
    font-family: sans-serif;
}
@media all and (min-width:500px) {
    body {
        background: blue;
        font-family: serif;
    }
}
@media all and (min-width:700px) {
    body {
        background: red;
        color: white;
    }
}</code></pre>
<p>Do you see how these media queries are not mutually exclusive? Both apply to windows greater than 700 pixels wide. If my viewport was 800 pixels wide, for instance, it would meet both the minimum width of 500 pixels and the minimum width of 700 pixels and apply the styles from both media queries. I&#8217;d have a red background with white text in a serif font.</p>
<p>When you overlap your media queries, the cascade and specificity come into play when determining which rules to use. For instance, if I used the same exact media queries containing the same exact CSS, but changed their order so that the <code>min-width:700px</code> one was first, I&#8217;d get different results:</p>
<pre><code>body {
    background: gray;
    font-family: sans-serif;
}
@media all and (min-width:700px) {
    body {
        background: red;
        color: white;
    }
}
@media all and (min-width:500px) {
    body {
        background: blue;
        font-family: serif;
    }
}</code></pre>
<p>Now my 800-pixel-wide viewport would have a blue background instead of red—the rule that comes later with the same specificity wins.</p>
<p>Instead of overlapping your media queries, you can stack or isolate them so that each is mutually exclusive:</p>
<pre><code>body {
    background: gray;
    font-family: sans-serif;
}
@media all and (min-width:500px) and (max-width:699px) {
    body {
        background: blue;
        font-family: serif;
    }
}
@media all and (min-width:700px) {
    body {
        background: red;
        color: white;
        font-family: serif;
    }
}</code></pre>
<p>Now only one of these media queries can apply at a time: the first applies in viewports between 500 and 699 pixels, and the second applies at 700 pixels and up. This means you don&#8217;t have to worry about cascade or specificity any more, but you do have to repeat any styles that you want to apply in both situations, such as <code>font-family:serif</code> in this example. On the other hand, you don&#8217;t have to override styles from earlier media queries that you don&#8217;t want to apply in the later media queries. So neither setup <em>always</em> leads to more or fewer lines of CSS.</p>
<p>Whether you overlap or stack also has an impact on which assets get downloaded in WebKit browsers. If you have multiple media queries that apply to the same situation (such as the 500px and 700px media queries both applying to the 800px viewport example above), WebKit-based browsers will download all the images in all of them, regardless of whether a later media query overrides one of the images in an earlier one. (This also happens with the styles <em>outside</em> any media queries, by the way.) This doesn&#8217;t happen if the media queries are stacked; in this case, WebKit will only download the images called for in the single, currently applicable one. (But again, it will download any images outside the media queries too, even if later overridden.) This handy information is from Greg&#8217;s &#8220;<a href="http://blog.assortedgarbage.com/2010/12/css3-media-queries-download-answers/">CSS3 Media Queries? Download Answers</a>&#8221; and Cloud Four&#8217;s &#8220;<a href="http://www.cloudfour.com/examples/mediaqueries/image-test/">Media Query Image Download Test</a>.&#8221;</p>
<h4>The pros and cons</h4>
<table class="pros-cons">
<caption> Overlapping vs stacked media queries<br />
</caption>
<tbody>
<tr>
<th class="pro" scope="col">Overlapping pros</th>
<th class="con" scope="col">Stacked cons</th>
</tr>
<tr>
<td class="pro">Smaller file size due to cascade not requiring you to repeat shared rules</td>
<td class="con">Bigger file size due to having to repeat rules you want to apply in multiple scenarios</td>
</tr>
<tr>
<td class="pro">Easy to update shared rule in one place</td>
<td class="con">Possible to forget to change all instance of repeated rule when updating</td>
</tr>
</tbody>
</table>
<table class="pros-cons">
<caption> Overlapping vs stacked media queries<br />
</caption>
<tbody>
<tr>
<th class="con" scope="col">Overlapping cons</th>
<th class="pro" scope="col">Stacked pros</th>
</tr>
<tr>
<td class="con">Bigger file size due to overriding rules from earlier queries in later queries</td>
<td class="pro">Smaller file size due to starting with clean slate with no earlier rules to override</td>
</tr>
<tr>
<td class="con">Images that get overridden/hidden later are still downloaded in WebKit-based browsers</td>
<td class="pro">Browsers only download  images inside currently-applicable media query</td>
</tr>
</tbody>
</table>
<h4>The bottom line</h4>
<p>I think overlapping media queries is more often than not the most efficient way to go. Most sites don&#8217;t have radically different looks between media queries—sure, the layout might appear very different, but things like the typography, colors, and various visual effects are usually the same. Because of this, I&#8217;ve found that in most cases you&#8217;ll end up writing a lot more lines of CSS if you stack your media queries and don&#8217;t get to take advantage of the cascade. (Hooray for the cascade!)</p>
<p>However, if you <em>do</em> happen to have a site that has <em>very</em> different styles in each media query, stacking may be more efficient than overlapping. Also, because of WebKit&#8217;s downloading behavior, if you&#8217;re switching a lot of images between media queries, it may be wise to stack those queries instead of overlapping them, even if that means more lines of CSS and more chance of forgetting to update a rule inside multiple queries.</p>
<h3 id="mq-default-styles">Which styles to make the &#8220;default&#8221;: mobile vs. desktop</h3>
<p>While it&#8217;s possible to put all of your styles inside media queries, you&#8217;ll almost never see this, as browsers that don&#8217;t support media queries will get no styles whatsoever. What usually happens is that a chunk of styles sit outside media queries, either inside your single style sheet or in their own style sheet using a standard <code>@import</code> call or <code>link</code>, and these essentially become your &#8220;default&#8221; or starting styles. You then layer on one or more media queries to form alternate styles for different scenarios.</p>
<p>Media queries aren&#8217;t just for creating different layouts for different screen sizes, but let&#8217;s face it, that&#8217;s their primary use right now—and a dang good one. So that&#8217;s what I&#8217;m focusing on here: whether to make the small-screen styles the default or whether to make wider-screen styles the default. A few caveats, however:</p>
<ul>
<li>For ease of writing, I&#8217;m just going to refer to the smaller-screen styles as &#8220;mobile&#8221; and the wider-screen styles as &#8220;desktop,&#8221; even though mobile styles might be viewed on desktop devices and vice versa, and even though not all mobile devices support media queries.</li>
<li>Also keep in mind that even though I&#8217;m simplifying it to two options for ease of discussion, you can have multiple media queries for each of these scenarios (such as 320px, 480px, and 600px &#8220;mobile&#8221; styles and 760px, 960px, and 1200px &#8220;desktop&#8221; styles), and any of these could be your default. You don&#8217;t have to make one extreme or the other the default.</li>
<li>Finally, I&#8217;m specifically talking about which styles you make the default in the CSS itself, not about which version of the layout you first design for when coming up with wireframes, comps, and what-have-you. In a certain project, it may make the most sense to plan for the desktop design first, but when it comes time to build the media queries, make the mobile styles first. Nathan C. Ford talks about this in &#8220;<a href="http://artequalswork.com/posts/target-first.php">Design for a Target Experience First</a>.&#8221;</li>
</ul>
<p>OK, are we all good? Good. Moving on.</p>
<p>Once again, WebKit&#8217;s downloading behavior is a big factor here. If you make the desktop styles the default and then override some of its assets in a mobile media query, either by setting new background images or setting elements that contain background or foreground images to <code>display:none</code>, Safari on iOS will still download the overridden or hidden desktop assets. The reverse is true: when mobile styles are the default, desktop Safari and Chrome will download all the mobile assets, even if overridden or hidden by the desktop styles.</p>
<p>This behavior isn&#8217;t &#8220;wrong,&#8221; by the way. It&#8217;s common for browsers to download assets that are set to <code>display:none</code>, as it allows the content to be preloaded and ready-to-go if later revealed by a script, such as a hover effect over text that reveals a thumbnail image. WebKit doesn&#8217;t discriminate between situations where the currently hidden image might be needed later, such as if the user can and does resizes her viewport, or if it will never, ever be called into play.</p>
<p>If the downloading of the unneeded image is problematic in your case, there are a few ways to work around it:</p>
<ul>
<li><a href="http://www.cloudfour.com/examples/mediaqueries/image-test/#t3">Cloud Four&#8217;s test page</a> shows that if you set an image as a background on a <code>div</code>, and then instead of hiding the <code>div</code> you hide the <code>div</code>&#8217;s <em>parent</em> element, WebKit won&#8217;t download the image.</li>
<li>You could simply choose to make your default styles neither mobile or desktop—just restrict them to basic text formatting, colors, and the like. Introduce layout and images only inside media queries.</li>
<li>There are a variety of ways to use scripting to control what gets downloaded when. Read &#8220;<a href="http://www.quirksmode.org/blog/archives/2010/08/combining_media.html">Combining media queries and JavaScript</a>&#8221; by Peter-Paul Koch for the general idea behind this, as well as &#8220;<a  rel="bookmark" href="http://www.cloudfour.com/responsive-imgs-part-2/">Responsive IMGs Part 2 — In-depth Look at Techniques</a>&#8221; by Jason Grigsby for a discussion of a whole bunch of scripting techniques to load images on an as-needed basis.</li>
</ul>
<p>These solutions won&#8217;t work with all sites, but they are options in some cases.</p>
<h4>The pros and cons</h4>
<table class="pros-cons">
<caption> Mobile-default vs desktop-default media queries<br />
</caption>
<tbody>
<tr>
<th class="pro" scope="col">Mobile-default pros</th>
<th class="con" scope="col">Desktop-default cons</th>
</tr>
<tr>
<td class="pro">Prevents mobile devices from downloading unneeded desktop assets</td>
<td class="con">Mobile devices may have to download unneeded desktop assets</td>
</tr>
<tr>
<td class="pro">Older, non-media-query-supporting mobile browsers still get the mobile styles without any extra work</td>
<td class="con">Requires separate style sheets or JavaScript to make mobile design appear in IE Mobile and older mobile browsers</td>
</tr>
</tbody>
</table>
<table class="pros-cons">
<caption> Mobile-default vs desktop-default media queries<br />
</caption>
<tbody>
<tr>
<th class="con" scope="col">Mobile-default cons</th>
<th class="pro" scope="col">Desktop-default pros</th>
</tr>
<tr>
<td class="con">Requires separate style sheets or JavaScript to make majority desktop design appear in IE 8 and earlier</td>
<td class="pro">No extra work to make majority-width appear correctly on IE 8 and earlier</td>
</tr>
<tr>
<td class="con">Desktop devices may have to download unneeded mobile assets</td>
<td class="pro">Prevents desktop devices from downloading unneeded mobile assets</td>
</tr>
<tr>
<td class="con">Requires complete overhaul of existing CSS when retrofitting existing site</td>
<td class="pro">Easiest way to retrofit existing site</td>
</tr>
</tbody>
</table>
<h4>The bottom line</h4>
<p>In most cases, I would advocate making the mobile styles the default, as it allows old mobile browsers to see the correct mobile styles. Yes, desktop IE 8 and earlier will also see those mobile styles, but this is an easy to fix with some JavaScript—a much more quick and straightforward process than getting your mobile styles to apply to non-media-query-supporting mobile browsers when you make desktop the default. Also, the fact that mobile devices won&#8217;t have to download any of the assets you call in the media-query-desktop styles is a big plus, as mobile devices are more likely (but definitely not guaranteed) to have slower connections and more limited bandwidth than desktop devices. I&#8217;ve made mobile styles the default in the last two sites I worked on, and I anticipate this being my go-to method going forward.</p>
<p>While<a href="http://www.lukew.com/ff/entry.asp?933"> mobile-first design</a>, as it&#8217;s been dubbed by Luke Wroblewski, has become quite popular, and  I too will sing its praises,  I don&#8217;t agree with those who say it&#8217;s the <em>only</em> viable way to craft media queries. Desktop-default has a fair share of merit too, as you can see in its pros list above. It&#8217;s a great way to <a href="http://simplebits.com/notebook/2011/08/19/adapted/">retrofit an existing site</a>, since you can add on a chunk of mobile styles instead of having to rewrite all the CSS from scratch. It&#8217;s also a great way to get your feet wet with media queries. Designing mobile-first is a big shift in both your mindset and design process, so sticking to desktop-first might be best on your first foray into creating a site utilizing media queries. In <a href="http://stunningcss3.com/samples/index.html">Chapter 6</a> of my book <em><a href="http://stunningcss3.com/">Stunning CSS3</a></em>, I take a desktop-default approach, as I think this is an easier way to first learn  media queries. The default styles are targeted towards a size that most desktop users will see, with styles for both wider and narrower versions layered on. This means that even if I didn&#8217;t use JavaScript to fix IE 8 and earlier, or if the JavaScript doesn&#8217;t load, users will still see a layout that will work well for the majority of desktop viewport sizes—just the same as they would before we had media queries as an option. Media queries are used as progressive enhancement, not a requirement.</p>
<h3 id="mq-internet-explorer">How to deal with IE 8 and earlier versions: conditional comments vs. JavaScript</h3>
<p>Speaking of IE, you probably know that Internet Explorer 8 and earlier versions don&#8217;t support media queries. Since these browsers are likely a big chunk of your audience, I suspect you&#8217;ll want to figure out a way to get your media queries to work in IE 8 and earlier. You have a couple options: use conditional comments to feed separate media query sheets to different versions of IE or use a pre-fab script to make media queries magically work in IE.</p>
<p>To use conditional comments, you&#8217;ll vary your approach based on which set of styles, mobile or desktop, are your default. In either case, you&#8217;ll need to have your media queries separated into external sheets, not embedded in a single sheet along with your default styles.</p>
<p>If desktop styles are the default and you want to use conditional comments, you don&#8217;t need to really worry about desktop versions of IE 8 and earlier—they&#8217;ll get the desktop styles automatically. Sure, they won&#8217;t get any variations on those desktop styles that you might have included to better fit every particular viewport size, but if you&#8217;re using media queries as progressive enhancement, this isn&#8217;t likely to be a problem. Sure, it&#8217;s not <em>ideal</em> if an IE user with an 1100-pixel viewport sees the default 700-960-pixel styles instead of the 960-and-up media query, but it shouldn&#8217;t be a deal-breaker—the layout they see isn&#8217;t likely to look broken or be unusable. They shouldn&#8217;t know anything is &#8220;wrong.&#8221; So there&#8217;s nothing extra that has to be done for desktop IE 8 and earlier in this desktop-default scenario.</p>
<p>But the default desktop styles have a much bigger impact in the mobile version of IE used on Windows Phone 7. Luckily you can <a href="http://blogs.msdn.com/b/iemobile/archive/2010/12/08/targeting-mobile-optimized-css-at-windows-phone-7.aspx">target it using a conditional comment</a> and feed it your mobile-specific sheet:</p>
<pre><code>&lt;link rel="stylesheet" href="global.css" media="all"&gt;
&lt;link rel="stylesheet" href="mobile.css" media="all and (max-width: 700px)"&gt;
&lt;!--[if IEMobile 7]&gt;
&lt;link rel="stylesheet" href="mobile.css" media="all"&gt;
&lt;![endif]--&gt;</code></pre>
<p>If mobile styles are your default, the situation is basically reversed: mobile-IE is fine without any extra work, but you have to feed desktop-IE the desktop styles using conditional comments. Again, we&#8217;re in luck when it comes to conditional comment syntax: it&#8217;s possible to craft a conditonal comment that targets IE 8 and earlier—which includes the version of IE on Windows Phone 7—but then also explicitly excludes mobile-IE:</p>
<pre><code>&lt;link rel="stylesheet" href="global.css" media="all"&gt;
&lt;link rel="stylesheet" href="desktop.css" media="all and (min-width: 700px)"&gt;
&lt;!--[if (lt IE 9)&amp;(!IEMobile 7)]&gt;
&lt;link rel="stylesheet" href="desktop.css" media="all"&gt;
&lt;![endif]--&gt;</code></pre>
<p>I learned about this handy conditional comment trick from Jeremy Keith&#8217;s article &#8220;<a href="http://adactio.com/journal/4494/">Windows mobile media queries</a>.&#8221; That Jeremy is one clever guy.</p>
<p>Both of these conditional comment variations don&#8217;t actually make media queries work in IE—they basically feed an alternate, static layout to IE, not based on viewport size or anything other than IE version number and platform, without any ability to switch dynamically between states. If you need more robust media queries support in IE 8 and earlier, or if you  want to be able to embed your media queries in a single sheet, you can instead simply link to a ready-to-use script that detects your media queries and makes them work in non-supporting browsers. There are currently two such scripts:</p>
<ul>
<li><a href="https://github.com/scottjehl/Respond">Respond</a> by Scott Jehl: This script is much smaller than the other, and when you resize your window, it makes the changes appear right away without any lag. It&#8217;s main downside is that it only supports the <code>min-width</code> and <code>max-width</code> media features (the only ones I tend to use anyway!). Also, I found it triggered some totally obscure IE bug in a layout I was working on recently. But in general, I don&#8217;t have any problems with this script and highly recommend it.</li>
<li><a href="http://code.google.com/p/css3-mediaqueries-js/">css3-mediaqueries.js</a> by Wouter van der Graaf: This script is bigger and slower than Respond, but it does support more media features and may be less buggy in some scenarios. It&#8217;s not my first choice, but it&#8217;s a great option too.</li>
</ul>
<p>Both of these scripts will work in non-IE browsers too, by the way. If you want to limit them to IE so others don&#8217;t have to take the HTTP hit, hide the script call in a conditional comment:</p>
<pre><code>&lt;!--[if (lt IE 9)&amp;(!IEMobile 7)]&gt;
&lt;script src="respond.min.js"&gt;&lt;/script&gt;
&lt;![endif]--&gt;</code></pre>
<h4>The pros and cons</h4>
<table class="pros-cons">
<caption> Conditional comments vs. JavaScript for IE media query support<br />
</caption>
<tbody>
<tr>
<th class="pro" scope="col">Conditional comments pros</th>
<th class="con" scope="col">JavaScript cons</th>
</tr>
<tr>
<td class="pro">Works when JavaScript is disabled</td>
<td class="con">Doesn&#8217;t work when JavaScript is disabled</td>
</tr>
<tr>
<td class="pro">All the pros of having external media queries</td>
<td class="con">All the cons of having embedded media queries</td>
</tr>
</tbody>
</table>
<table class="pros-cons">
<caption> Conditional comments vs. JavaScript for IE media query support<br />
</caption>
<tbody>
<tr>
<th class="con" scope="col">Conditional comments cons</th>
<th class="pro" scope="col">JavaScript pros</th>
</tr>
<tr>
<td class="con">Feed IE only one static layout, rather than making media queries work so that layout can change on the fly</td>
<td class="pro">Makes existing media queries work so layout can change on the fly</td>
</tr>
<tr>
<td class="con">All the cons of having external media queries</td>
<td class="pro">All the pros of having embedded media queries</td>
</tr>
</tbody>
</table>
<h4>The bottom line</h4>
<p>Plugging in a little script takes no effort whatsoever, so if you&#8217;re using embedded media queries, why not use one of the JavaScripts? For the small percentage of people using IE 8 and earlier with JavaScript turned off, I&#8217;m not concerned about them simply seeing the default styles; if mobile is default, they&#8217;ll get simple but readable and clean, and if desktop is default, it will probably look just right anyway!</p>
<h3>Summing it all up</h3>
<p>By now  you&#8217;ve seen that there are lots of important decisions that go into how you set up your media queries for maximum efficiency, robustness, and ease of use. These decisions include whether to:</p>
<ul>
<li><a href="#mq-embed-external">Make the media queries embedded or external</a></li>
<li><a href="#mq-overlap-stack">Overlap or stack your media queries</a></li>
<li><a href="#mq-default-styles">Make mobile or desktop styles the default</a></li>
<li><a href="#mq-internet-explorer">Use conditional comments or JavaScript to add support for IE 8 and earlier versions</a></li>
</ul>
<p>Hopefully I&#8217;ve given you the information you need to make those decisions easier.</p>
<p>There are lots of other decisions you&#8217;ll need to make along the way that I haven&#8217;t covered, such as:</p>
<ul>
<li>Which media features to use (Use <code>max-width</code> or <code>max-device-width</code>? Use <a href="http://www.quirksmode.org/blog/archives/2010/04/the_orientation.html"><code>orientation</code></a>? That sort of thing.)</li>
<li>Which dimensions to target, aka the breaking points in the design</li>
<li>Which units to use for those breaking points (Pixels or <a href="http://www.goldilocksapproach.com/">ems</a>?)</li>
</ul>
<p>Don&#8217;t let all these decisions scare you off using media queries. Just know that, like any design technique, you can go about it with careful consideration or you can just quickly slap some sloppy media queries on your site. Think through the pros and cons of your media query configuration so that your media queries don&#8217;t just work, but <em>work well</em>.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://zomigi.com/blog/media-queries-presentation/' title='Media queries presentation at indieconf'>Media queries presentation at indieconf</a></li>
<li><a href='http://zomigi.com/blog/examples-of-flexible-layouts-with-css3-media-queries/' title='Examples of flexible layouts with CSS3 media queries'>Examples of flexible layouts with CSS3 media queries</a></li>
<li><a href='http://zomigi.com/blog/bug-fixes-for-removing-the-inner-shadow-on-ios-inputs/' title='Bug fixes for removing the inner shadow on iOS inputs'>Bug fixes for removing the inner shadow on iOS inputs</a></li>
<li><a href='http://zomigi.com/blog/theres-already-a-book-on-responsive-web-design-want-to-win-it/' title='There&#8217;s already a book on responsive web design. Want to win it?'>There&#8217;s already a book on responsive web design. Want to win it?</a></li>
<li><a href='http://zomigi.com/blog/ie-7-button-text-redraw-bug/' title='IE 7 button text redraw bug'>IE 7 button text redraw bug</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://zomigi.com/blog/essential-considerations-for-crafting-quality-media-queries/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>A few links: CSS and accessibility</title>
		<link>http://zomigi.com/blog/a-few-links-css-and-accessibility/</link>
		<comments>http://zomigi.com/blog/a-few-links-css-and-accessibility/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 16:11:07 +0000</pubDate>
		<dc:creator>Zoe Gillenwater</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[screen readers]]></category>

		<guid isPermaLink="false">http://zomigi.com/?p=571</guid>
		<description><![CDATA[A few links to handy articles from 456 Berea Street related to CSS and accessibility: using list-style:none, using display:table, and styling buttons to look like links.]]></description>
			<content:encoded><![CDATA[<p>The blog <a href="http://www.456bereastreet.com/">456 Berea Street</a> by <a href="http://twitter.com/rogerjohansson">Roger Johansson</a> is one of my favorite sites for useful information on web standards topics presented in a really clearly written and succinct way. He&#8217;s had some great articles recently related to the intersection of CSS and accessibility that I thought were worth sharing.</p>
<h3>&#8220;<a href="http://www.456bereastreet.com/archive/201109/screen_readers_list_items_and_list-stylenone/">Screen readers, list items and list-style:none</a>&#8220;</h3>
<p>Roger found that some screen readers won’t announce list items if <code>list-style:none</code> is set on the list. (They will announce the list as a whole, just not the individual list <em>items</em>.) This very common bit of CSS <em>visually </em>represses the list markers, of course, but (probably?) shouldn’t change the spoken output. Unfortunately, this falls squarely into the &#8220;good to know, but what do you want me to do about it?&#8221; camp. Just keep it in mind, and hopefully the offending screen readers will fix this behavior soon.</p>
<h3>&#8220;<a href="http://www.456bereastreet.com/archive/201110/using_displaytable_has_semantic_effects_in_some_screen_readers/">Using display:table has semantic effects in some screen readers</a>&#8220;</h3>
<p>Same sort of thing, only with <code>display:table</code>. NVDA in Firefox as well as the ORCA screen reader incorrectly announce elements that you’ve set to <code>display:table</code> as actual, semantic tables. This might be an area where you do have other options than using <code>display:table</code> (as opposed to <code>list-style:none</code>, where there are no alternatives if you don&#8217;t want markers), so this screen reader quirk is a little more helpful to know. I wouldn&#8217;t consider this a deal-breaker, but if you can easily avoid it, I say why not? If you can&#8217;t really avoid it, I wouldn&#8217;t sweat it, but again, keep it in mind.</p>
<h3>&#8220;<a href="http://www.456bereastreet.com/archive/201110/styling_button_elements_to_look_like_links/">Styling button elements to look like links</a>&#8220;</h3>
<p>This is a useful CSS snippet for when you want something to look like a link (plain text) but act like a button (initiate an action other than taking someone to a new page). Roger points out, of course, that it would be better if the design were changed so that things that act like buttons look like buttons, but this is a good option when you can’t convince those darn designers to change things! (I&#8217;m allowed to jokingly complain about designers since I am one.)<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://zomigi.com/blog/web-accessibility-presentation-resources/' title='Web accessibility presentation and resources'>Web accessibility presentation and resources</a></li>
<li><a href='http://zomigi.com/blog/videos-of-screen-readers-using-aria-updated/' title='Videos of screen readers using ARIA, updated'>Videos of screen readers using ARIA, updated</a></li>
<li><a href='http://zomigi.com/blog/videos-of-screen-readers-using-aria/' title='Videos of screen readers using ARIA'>Videos of screen readers using ARIA</a></li>
<li><a href='http://zomigi.com/blog/media-queries-presentation/' title='Media queries presentation at indieconf'>Media queries presentation at indieconf</a></li>
<li><a href='http://zomigi.com/blog/ie-7-button-text-redraw-bug/' title='IE 7 button text redraw bug'>IE 7 button text redraw bug</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://zomigi.com/blog/a-few-links-css-and-accessibility/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IE 7 button text redraw bug</title>
		<link>http://zomigi.com/blog/ie-7-button-text-redraw-bug/</link>
		<comments>http://zomigi.com/blog/ie-7-button-text-redraw-bug/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 16:37:37 +0000</pubDate>
		<dc:creator>Zoe Gillenwater</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://zomigi.com/?p=561</guid>
		<description><![CDATA[Internet Explorer 7 has a bug where, when it redraws the text of buttons after scrolling them out and then back into the viewport, lines of pixels are missing from the text. I can't figure out a fix and need some help.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve run into an IE 7 bug that I&#8217;ve been unable to fix. I&#8217;m hoping some of you, dear readers, can help me figure it out.</p>
<p>I&#8217;m working on some styled buttons, created with the <code>&lt;button&gt;</code> element and some pretty basic CSS. In IE 7, if you scroll down the page so that the buttons move out of the viewport, then scroll back up to reveal them again, you&#8217;ll see lines of missing pixels drawn across the text of the buttons. It varies each time you scroll, so sometimes you won&#8217;t see any lines, and occasionally the entire text will disappear. The lines appear most often with the buttons with the largest text, but I think this is mainly just due to there being more pixels there to draw lines through, increasing the likelihood that IE 7 can screw it up. Hovering over the buttons or refreshing the page restores the text.</p>
<p>You can see a screenshot of the bug below, and view the bug live in IE 7 in my <a href="http://zomigi.com/demo/ie7_button_text_redraw_bug.html">test page</a>.</p>
<div id="attachment_562" class="wp-caption alignnone" style="width: 421px"><a href="http://zomigi.com/wp-content/uploads/2011/04/ie7_button_text_redraw_bug.png"><img class="size-full wp-image-562"  src="http://zomigi.com/wp-content/uploads/2011/04/ie7_button_text_redraw_bug.png" alt="" width="411" height="65" /></a><p class="wp-caption-text">The buttons in IE 7 have lines drawn through their text, as if little strips of the text were erased.</p></div>
<p><span id="more-561"></span>I found a <a href="http://wnas.tumblr.com/post/897410248/redraw-problem-in-ie-7">blog post</a> that said that adding a one-pixel transparent border fixed the bug. I tried this and found that it does indeed fix the bug, but only if you remove either <code>background-color</code> or <code>font-size</code>. Both of those properties trigger the bug to begin with, and the border fix seems to only have enough power to fix one of the triggers, not both. I can&#8217;t remove either of those properties, so the border fix is a no-go. (Plus, the border does not actually show as transparent when I tested it, which makes it a deal-breaker anyway.)</p>
<p>Through experimenting, I found that removing <code>overflow:visible</code> also solves the bug. Unfortunately, that brings back the <a href="http://www.viget.com/inspire/styling-the-button-element-in-internet-explorer/">excess padding button bug</a> that IE 7 and IE 6 suffer from. Setting <code>overflow:visible</code> seems to be the only fix for this bug, so this too is a property I can&#8217;t remove.</p>
<p>I of course tried the standard fixes of adding <code>zoom:1</code> and <code>position:relative</code>, but neither of these, either together or separately, had any effect on the buttons.</p>
<p>I&#8217;ve tried so many things and I&#8217;m out of ideas. Can anyone help?<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://zomigi.com/blog/bug-fixes-for-removing-the-inner-shadow-on-ios-inputs/' title='Bug fixes for removing the inner shadow on iOS inputs'>Bug fixes for removing the inner shadow on iOS inputs</a></li>
<li><a href='http://zomigi.com/blog/media-queries-presentation/' title='Media queries presentation at indieconf'>Media queries presentation at indieconf</a></li>
<li><a href='http://zomigi.com/blog/essential-considerations-for-crafting-quality-media-queries/' title='Essential considerations for crafting quality media queries'>Essential considerations for crafting quality media queries</a></li>
<li><a href='http://zomigi.com/blog/a-few-links-css-and-accessibility/' title='A few links: CSS and accessibility'>A few links: CSS and accessibility</a></li>
<li><a href='http://zomigi.com/blog/theres-already-a-book-on-responsive-web-design-want-to-win-it/' title='There&#8217;s already a book on responsive web design. Want to win it?'>There&#8217;s already a book on responsive web design. Want to win it?</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://zomigi.com/blog/ie-7-button-text-redraw-bug/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Bug fixes for removing the inner shadow on iOS inputs</title>
		<link>http://zomigi.com/blog/bug-fixes-for-removing-the-inner-shadow-on-ios-inputs/</link>
		<comments>http://zomigi.com/blog/bug-fixes-for-removing-the-inner-shadow-on-ios-inputs/#comments</comments>
		<pubDate>Wed, 13 Apr 2011 23:30:48 +0000</pubDate>
		<dc:creator>Zoe Gillenwater</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[backgrounds]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://zomigi.com/?p=538</guid>
		<description><![CDATA[You should be able to remove the default inner shadows on text field inputs in Safari on iOS using <code>-webkit-appearance</code>, but a couple bugs with the property reduce its usefulness. Luckily, you can work around the bugs using CSS3 gradient background images instead.]]></description>
			<content:encoded><![CDATA[<p>A while back <a href="http://trentwalton.com/2010/07/14/css-webkit-appearance/">Trent Walton</a> wrote about using <code><a href="http://developer.apple.com/library/safari/#documentation/appleapplications/reference/SafariCSSRef/Articles/StandardCSSProperties.html#//apple_ref/doc/uid/TP30001266-ColorsandBackgrounds">-webkit-appearance</a></code> to override the default styles of form elements in Safari on iOS devices (iPad, iPhone, and iPod Touch). Safari on iOS adds an inner shadow to the top of input text fields. It can only be overridden by setting <code>-webkit-appearance</code> to <code>none</code> or <code>caret</code>, or by adding a background image to the field.</p>
<p>Sounds like an easy fix, right? But if you didn&#8217;t read the comments on Trent&#8217;s article, you might have missed two important bugs* connected to using <code>-webkit-appearance</code> to remove the inner shadow:</p>
<ol>
<li>If you use <code>caret</code>, it removes not just the inner shadow but also the borders on desktop versions of Safari and Chrome (as well as the beta version of the WebKit-based browser on the TouchPad tablet).</li>
<li>If you use <code>none</code>, it removes the inner shadow and leaves borders alone, but it disables focus styles on iPad.</li>
</ol>
<p>In the case of the missing focus, I haven&#8217;t been able to confirm this myself; I don&#8217;t have an iPad, but the people I&#8217;ve asked to test it for me (thanks <a href="http://twitter.com/joshmarinacci">Josh</a>!) have said the focus styles <em>do </em>show up, even when <code>-webkit-appearance: none</code> is set. Perhaps it&#8217;s a case of the version of iOS in use, perhaps the person who reported this bug in the comments to Trent&#8217;s article was simply having a problem with his individual machine, or perhaps there was something else in the CSS that was truly responsible for the problem. So it&#8217;s still not clear to me whether the second bug I listed above is really present. Do any of you iPad users have a problem seeing the red outline on focus in my <a href="http://zomigi.com/demo/styling-text-fields.html">test page</a>?</p>
<p>If both of these bugs are truly present, they severely limit the circumstances in which <code>-webkit-appearance</code> can be used to remove <code>input</code>s&#8217; inner shadows. Luckily, we can use a background image instead of <code>-webkit-appearance</code> to remove the shadow. But what if you don&#8217;t want any background image to show? Simple—make the background image invisible. Some smart people on <a href="http://stackoverflow.com/questions/2839618/iphone-web-app-type-text-inner-shadow-issue">Stack Overflow</a> suggested a couple ways to do just that:</p>
<ol>
<li>Tile a transparent GIF as the background image.</li>
<li>Add a CSS3 gradient that runs from transparent white to transparent white.</li>
</ol>
<p>I think the gradient option is ideal because it doesn&#8217;t require an extra hit to the server to retrieve the transparent GIF. And there&#8217;s no need to worry about lack of browser support, since the only browsers we want to apply the gradient are Safari on iOS.</p>
<p>Here&#8217;s what the CSS would look like for the gradient:</p>
<pre><code>background-image:-webkit-gradient(linear, 0% 0%, 0% 100%, from(hsla(0,0%,100%,0)), to(hsla(0,0%,100%,0)));
background-image:-webkit-linear-gradient(hsla(0,0%,100%,0), hsla(0,0%,100%,0));</code></pre>
<p>The first <code>background-image</code> declaration, using the <code>-webkit-gradient</code> function, is what will actually work in Safari on iOS today. The second declaration using <code>-webkit-linear-gradient</code> is there for future compatibility; WebKit has recently <a href="http://www.webkit.org/blog/1424/css3-gradients/">updated its gradient syntax</a> to match the W3C specification. These syntax changes are in nightly builds and will make it into live versions of Safari and Chrome sometime soon, and you want your CSS to be prepared.</p>
<p>Most of this is not new information—it&#8217;s almost all in <a href="http://trentwalton.com/2010/07/14/css-webkit-appearance/">Trent&#8217;s article and comments</a> and the <a href="http://stackoverflow.com/questions/2839618/iphone-web-app-type-text-inner-shadow-issue">Stack Overflow</a> page. But I wanted to put it all together in one place, clearly explained, for easy reference. Hope it helps you out!</p>
<p class="note">*I don&#8217;t actually know that these are true bugs. But they sure seem like bugs to me, and in any case, they certainly need some working around!</p>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://zomigi.com/blog/media-queries-presentation/' title='Media queries presentation at indieconf'>Media queries presentation at indieconf</a></li>
<li><a href='http://zomigi.com/blog/essential-considerations-for-crafting-quality-media-queries/' title='Essential considerations for crafting quality media queries'>Essential considerations for crafting quality media queries</a></li>
<li><a href='http://zomigi.com/blog/a-few-links-css-and-accessibility/' title='A few links: CSS and accessibility'>A few links: CSS and accessibility</a></li>
<li><a href='http://zomigi.com/blog/theres-already-a-book-on-responsive-web-design-want-to-win-it/' title='There&#8217;s already a book on responsive web design. Want to win it?'>There&#8217;s already a book on responsive web design. Want to win it?</a></li>
<li><a href='http://zomigi.com/blog/free-samples-of-stunning-css3/' title='Free samples of Stunning CSS3'>Free samples of Stunning CSS3</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://zomigi.com/blog/bug-fixes-for-removing-the-inner-shadow-on-ios-inputs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>There&#8217;s already a book on responsive web design. Want to win it?</title>
		<link>http://zomigi.com/blog/theres-already-a-book-on-responsive-web-design-want-to-win-it/</link>
		<comments>http://zomigi.com/blog/theres-already-a-book-on-responsive-web-design-want-to-win-it/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 13:49:59 +0000</pubDate>
		<dc:creator>Zoe Gillenwater</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Flexible Web Design]]></category>
		<category><![CDATA[giveaway]]></category>
		<category><![CDATA[responsive web design]]></category>
		<category><![CDATA[Stunning CSS3]]></category>

		<guid isPermaLink="false">http://zomigi.com/?p=522</guid>
		<description><![CDATA[I'm giving away two copies each of my two books. Use them together to learn all about how to make responsive web designs.]]></description>
			<content:encoded><![CDATA[<p>Since Ethan Marcotte wrote his <a href="http://www.alistapart.com/articles/responsive-web-design/">seminal article on responsive web design</a> less than a year ago, the concept of creating liquid/fluid designs that make use of media queries to adapt to the user&#8217;s screen has <a href="http://zomigi.com/blog/examples-of-flexible-layouts-with-css3-media-queries/">taken off</a>. I&#8217;m ecstatic about this. I&#8217;ve been designing and building primarily liquid sites for several years now, and I want others to do the same. Responsive web designs can offer tremendous usability and accessibility benefits, while still looking beautiful, not dumbed down.</p>
<p>From a technical standpoint, creating liquid designs with media queries is not that complicated, in theory. But doing so requires a sometimes huge shift in mindset and design process, and this is where brief online articles on the topic fall a little short, simply due to the nature of their publication medium. What we really need is a whole <em>book </em>on responsive web design, covering all its intricacies. Ethan Marcotte is <a href="http://books.alistapart.com/products/responsive-web-design">working on one</a>, and I can&#8217;t wait to get my hands on it when it comes out later this year.</p>
<p>But it turns out that there&#8217;s already a book on responsive web design. OK, technically, it&#8217;s more like 1.2<em> </em>books. My first book, <a href="http://www.flexiblewebbook.com/"><em>Flexible Web Design: Creating Liquid and Elastic Layouts with CSS</em></a>, is the only book out there that&#8217;s entirely devoted to designing and building robust and attractive web sites that adapt to the user&#8217;s viewing preferences. It includes not only detailed instructions on how to create the CSS for the layouts, but also how to make the images within them flexible and how to design them from the comp stage with flexibility baked in. All you need to add to any of the layouts you learn about in <em>Flexible Web Design</em> to make them &#8220;responsive&#8221; is media queries—and I cover those fully in chapter 6 of my new book <a href="http://stunningcss3.com/"><em>Stunning CSS3: A Project-based Guide to the Latest in CSS</em></a>. Put them together, and you have a detailed, comprehensive guide on how to create awesome responsive web designs.</p>
<p>I want everyone to start making responsive web designs, so I want to give away a bundle of both my books. Actually, I want to give away <em>two</em> bundles. So two people will get a copy each of <em>Flexible Web Design</em> and <em>Stunning CSS3</em>.</p>
<p><span id="more-522"></span>To win, I&#8217;m not going to ask you to <a href="http://twitter.com/zomigi/">follow me on Twitter</a> (though I would really like it if you would) and retweet some canned message about this giveaway (though you&#8217;re certainly welcome to tweet about this). All you have to do to win my books is leave a comment on this post. Any comment will do, though I&#8217;d love to hear your thoughts on flexible design, media queries, CSS3, or anything relevant to the work we all do.</p>
<p>I&#8217;ll pick two commenters at random on Saturday, February 26, at 8am Eastern US time. Good luck!</p>
<p>In the meantime, you can learn more about my books and download free samples at their respective web sites: <a href="http://www.flexiblewebbook.com/"><em>Flexible Web Design: Creating Liquid and Elastic Layouts with CSS</em></a> and <a href="http://stunningcss3.com/"><em>Stunning CSS3: A Project-based Guide to the Latest in CSS</em></a>.</p>
<h3>Update 2/28/11:</h3>
<p>The winners, picked with a random number generator, are Chris Hawkins (comment 16) and Todd C (comment 33). Congrats guys! I&#8217;ll be in touch about sending your books.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://zomigi.com/blog/media-queries-presentation/' title='Media queries presentation at indieconf'>Media queries presentation at indieconf</a></li>
<li><a href='http://zomigi.com/blog/free-samples-of-stunning-css3/' title='Free samples of Stunning CSS3'>Free samples of Stunning CSS3</a></li>
<li><a href='http://zomigi.com/blog/examples-of-flexible-layouts-with-css3-media-queries/' title='Examples of flexible layouts with CSS3 media queries'>Examples of flexible layouts with CSS3 media queries</a></li>
<li><a href='http://zomigi.com/blog/announcing-my-new-book-stunning-css3/' title='Announcing my new book, Stunning CSS3'>Announcing my new book, Stunning CSS3</a></li>
<li><a href='http://zomigi.com/blog/essential-considerations-for-crafting-quality-media-queries/' title='Essential considerations for crafting quality media queries'>Essential considerations for crafting quality media queries</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://zomigi.com/blog/theres-already-a-book-on-responsive-web-design-want-to-win-it/feed/</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>Free samples of Stunning CSS3</title>
		<link>http://zomigi.com/blog/free-samples-of-stunning-css3/</link>
		<comments>http://zomigi.com/blog/free-samples-of-stunning-css3/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 21:45:23 +0000</pubDate>
		<dc:creator>Zoe Gillenwater</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[freebies]]></category>
		<category><![CDATA[Stunning CSS3]]></category>

		<guid isPermaLink="false">http://zomigi.com/?p=472</guid>
		<description><![CDATA[Get a taste of my new book, <i>Stunning CSS3: A Project-based Guide to the Latest in CSS</i>, by downloading extensive excerpts from Chapter 2 and Chapter 6.]]></description>
			<content:encoded><![CDATA[<p>Have you checked out the companion site for my new book <a href="http://www.stunningcss3.com/"><em>Stunning CSS3: A Project-based Guide to the Latest in CSS</em></a>? There&#8217;s a new addition there: <a href="http://stunningcss3.com/samples/index.html">two free sample PDFs</a> with extensive excerpts from Chapter 2 and Chapter 6.</p>
<p>Chapter 2 is titled &#8220;Speech Bubbles&#8221; and it teaches you exactly that: how to make speech bubbles with pure CSS and no images. The excerpt covers <code>word-wrap</code>, generated content, <code>border-radius</code>, and HSLA/RGBA for semi-transparent backgrounds. The rest of the chapter covers <code>linear-gradient</code>, <code>box-shadow</code>, <code>text-shadow</code>, and <code>transform</code>.</p>
<p class="note">Around the same time I was writing this chapter, Nicolas Gallagher posted an <a href="http://nicolasgallagher.com/pure-css-speech-bubbles/">excellent demo</a> on creating speech bubbles with CSS3 too, which I saw later. It&#8217;s definitely worth checking out as well. Great inspiration.</p>
<p>Chapter 6 is titled &#8220;Different Screen Size, Different Design&#8221; and teaches you how to restyle an entire page layout to work with different screen sizes using media queries and multi-columns. You can see the example site used in chapter 6, as well as other real web sites using responsive layouts, at my blog post &#8220;<a href="http://zomigi.com/blog/examples-of-flexible-layouts-with-css3-media-queries/">Examples of flexible layouts with CSS3 media queries</a>.&#8221;</p>
<p>If these samples whet your appetite, you can also see a brief <a href="http://stunningcss3.com/about.html#toc">table of contents</a>, <a href="http://stunningcss3.com/about.html#gallery">images of some of the book&#8217;s pages</a>, and <a href="http://stunningcss3.com/resources/index.html">links to related resources</a>. And of course, if you&#8217;d like to <a href="http://stunningcss3.com/index.php#buy">buy the book</a>, there are links to a number of sources in the sidebar of the <em>Stunning CSS3</em> site.</p>
<p>Learn away!<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://zomigi.com/blog/theres-already-a-book-on-responsive-web-design-want-to-win-it/' title='There&#8217;s already a book on responsive web design. Want to win it?'>There&#8217;s already a book on responsive web design. Want to win it?</a></li>
<li><a href='http://zomigi.com/blog/announcing-my-new-book-stunning-css3/' title='Announcing my new book, Stunning CSS3'>Announcing my new book, Stunning CSS3</a></li>
<li><a href='http://zomigi.com/blog/media-queries-presentation/' title='Media queries presentation at indieconf'>Media queries presentation at indieconf</a></li>
<li><a href='http://zomigi.com/blog/examples-of-flexible-layouts-with-css3-media-queries/' title='Examples of flexible layouts with CSS3 media queries'>Examples of flexible layouts with CSS3 media queries</a></li>
<li><a href='http://zomigi.com/blog/essential-considerations-for-crafting-quality-media-queries/' title='Essential considerations for crafting quality media queries'>Essential considerations for crafting quality media queries</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://zomigi.com/blog/free-samples-of-stunning-css3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Examples of flexible layouts with CSS3 media queries</title>
		<link>http://zomigi.com/blog/examples-of-flexible-layouts-with-css3-media-queries/</link>
		<comments>http://zomigi.com/blog/examples-of-flexible-layouts-with-css3-media-queries/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 11:22:17 +0000</pubDate>
		<dc:creator>Zoe Gillenwater</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[liquid]]></category>
		<category><![CDATA[media queries]]></category>
		<category><![CDATA[responsive web design]]></category>
		<category><![CDATA[Stunning CSS3]]></category>

		<guid isPermaLink="false">http://zomigi.com/?p=442</guid>
		<description><![CDATA[Media queries let you to feed different CSS to users based on their viewport size (among other things), allowing you to create even more flexible layouts than ever before. See visual examples of real sites that use CSS3 media queries to make the layout more adaptable to the variety of screen sizes and devices in use today.]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://zomigi.com/blog/adobe-max/">CSS3 presentation</a> that I&#8217;ve given several times over the past year, the part that seems to impress the audience the most is my demonstrations of <a href="http://www.w3.org/TR/css3-mediaqueries/">media queries</a>. I&#8217;m with them. I think media queries are perhaps the most useful and exciting piece of all the great new stuff that&#8217;s new to CSS3.</p>
<p>While creating effective, attractive, <a href="http://zomigi.com/blog/essential-resources-for-creating-liquid-and-elastic-layouts/">flexible layouts</a> that adapt to the user&#8217;s screen size has always been possible, media queries add another layer on top of flexible layouts to make them even more adaptable to an even wider range of sizes, allowing you to really fine-tune the experience for even more users. Media queries allow you to selectively feed styles based on the characteristics of the user&#8217;s display or device, such as how much width is available in the viewport, whether it&#8217;s in portrait or landscape mode, or whether it can display color.</p>
<p>My demonstration of media queries is the fictional <a href="http://stunningcss3.com/code/bakery/index.html">Little Pea Bakery</a> site, created for my book <a href="http://stunningcss3.com"><em>Stunning CSS3: A Project-based Guide to the Latest in CSS</em></a>. Here&#8217;s how it looks for most users (shown here at 990 pixels wide):</p>
<div id="attachment_445" class="wp-caption alignnone" style="width: 363px"><a href="http://zomigi.com/wp-content/uploads/2010/12/mediaqueries_bakery1.png"><img class="size-full wp-image-445"  src="http://zomigi.com/wp-content/uploads/2010/12/mediaqueries_bakery1.png" alt="" width="353" height="410" /></a><p class="wp-caption-text">The &quot;default&quot; layout seen by most users.</p></div>
<p>It&#8217;s a liquid (also known as fluid) layout so it can adapt to the user&#8217;s screen size, but the design doesn&#8217;t look as good and isn&#8217;t as readable when the viewport width is very narrow or very wide. I used media queries to solve this problem. Here&#8217;s how the page looks over 1200 pixels wide:</p>
<div id="attachment_446" class="wp-caption alignnone" style="width: 510px"><a href="http://zomigi.com/wp-content/uploads/2010/12/mediaqueries_bakery2.png"><img class="size-full wp-image-446"  src="http://zomigi.com/wp-content/uploads/2010/12/mediaqueries_bakery2.png" alt="" width="500" height="392" /></a><p class="wp-caption-text">The layout for wide screens (over 1200 pixels) adds a third column.</p></div>
<p><span id="more-442"></span>Using a media query and just a few lines of CSS, I was able to easily turn the horizontal navigation bar into a vertical menu in a new third column. This kept the text line lengths from getting too long and making the overall design look too stretched out.</p>
<p>Going in the opposite direction, here&#8217;s what happens to the design under 760 pixels wide:</p>
<div id="attachment_446" class="wp-caption alignnone" style="width: 260px"><a href="http://zomigi.com/wp-content/uploads/2010/12/mediaqueries_bakery3.png"><img class="size-full wp-image-446"  src="http://zomigi.com/wp-content/uploads/2010/12/mediaqueries_bakery3.png" alt="" width="250" height="564" /></a><p class="wp-caption-text">The layout for narrow screens.</p></div>
<p>We&#8217;re back to two columns, as in the &#8220;base&#8221; layout, but I&#8217;ve made changes to keep the content from appearing too squished and the line lengths getting too short. First, I got rid of the two columns in the introductory text. I also moved the three featured product boxes from sitting side-by-side to stacking on top of each other, moving the icon for each one from the top of the product box to the left side.</p>
<p>A third media query improves the design on small mobile screens, seen here at 480 pixels and 320 pixels:</p>
<div id="attachment_446" class="wp-caption alignnone" style="width: 305px"><a href="http://zomigi.com/wp-content/uploads/2010/12/mediaqueries_bakery4.png"><img class="size-full wp-image-446"  src="http://zomigi.com/wp-content/uploads/2010/12/mediaqueries_bakery4.png" alt="" width="295" height="897" /></a><p class="wp-caption-text">The layout for very small mobile screens uses only one column.</p></div>
<p>The design is now a single column. The main page heading and introductory text are smaller, as are the product icons.</p>
<p>To see all these changes in action, <a href="http://stunningcss3.com/code/bakery/index.html">view the page yourself</a> and resize the browser window. To see how it was done, check out the CSS embedded in the head of the page. You can learn the full details, of course, by reading <a href="http://stunningcss3.com/samples/index.html">Chapter 6 of <em>Stunning CSS3</em></a>.</p>
<p>For more examples of flexible layouts that use media queries to further enhance the site&#8217;s adaptability, dubbed &#8220;<a href="http://www.alistapart.com/articles/responsive-web-design/">responsive web design</a>&#8221; by Ethan Marcotte, see the following sites. Small screenshots don&#8217;t do them justice, so be sure to click through to the sites and resize your browser window back and forth to get the full effect.</p>
<ul class="list-extended">
<li><a href="http://hicksdesign.co.uk/">Hicksdesign<img class="alignnone size-full wp-image-452"  src="http://zomigi.com/wp-content/uploads/2010/12/mediaqueries_hicks.png" alt="" width="500" height="245" /></a></li>
<li><a href="http://2011.uxlondon.com/">UX London<img class="alignnone size-full wp-image-456"  src="http://zomigi.com/wp-content/uploads/2010/12/mediaqueries_uxlondon.png" alt="" width="500" height="391" /></a></li>
<li><a href="http://www.stpaulsschool.org.uk/">St. Paul’s School<img class="alignnone size-full wp-image-455"  src="http://zomigi.com/wp-content/uploads/2010/12/mediaqueries_stpauls.png" alt="" width="500" height="377" /></a></li>
<li><a href="http://css-tricks.com/">CSS-Tricks<img class="alignnone size-full wp-image-450"  src="http://zomigi.com/wp-content/uploads/2010/12/mediaqueries_csstricks.png" alt="" width="500" height="237" /></a></li>
<li><a href="http://yiibu.com/">Yiibu<img class="alignnone size-full wp-image-457"  src="http://zomigi.com/wp-content/uploads/2010/12/mediaqueries_yiibu.png" alt="" width="500" height="323" /></a></li>
<li><a href="http://sickdesigner.com/">Sick Designer<img class="alignnone size-full wp-image-453"  src="http://zomigi.com/wp-content/uploads/2010/12/mediaqueries_sickdesigner.png" alt="" width="500" height="238" /></a></li>
<li><a href="http://ethanmarcotte.com/">Ethan Marcotte</a></li>
<li><a href="http://simplebits.com/">SimpleBits</a></li>
<li><a href="http://london2010.sciencehackday.com/">Science Hack Day</a></li>
<li><a href="http://www.saltercane.com/">Salter Cane</a></li>
<li><a href="http://huffduffer.com/">Huffduffer</a></li>
<li><a href="http://adactio.com/journal/">Adactio</a></li>
<li><a href="http://mindgarden.de/">mindgarden</a></li>
<li><a href="http://2010.dconstruct.org/">dConstruct 2010</a></li>
<li><a href="http://www.edgeofmyseat.com/">edgeofmyseat.com</a></li>
<li><a href="http://dtott.com/">Daniel T Ott</a></li>
</ul>
<p>All of these sites use liquid layouts, but that&#8217;s not a requirement for using media queries. It&#8217;s also possible to use media queries to essentially create multiple fixed-width layouts that can be switched between on the fly. A few sites that do this are:</p>
<ul class="list-extended">
<li><a href="http://colly.com/">Simon Collison<img class="alignnone size-full wp-image-449"  src="http://zomigi.com/wp-content/uploads/2010/12/mediaqueries_colly.png" alt="" width="500" height="282" /></a></li>
<li><a href="http://stream.andycroll.com/">Andy Croll<img class="alignnone size-full wp-image-444"  src="http://zomigi.com/wp-content/uploads/2010/12/mediaqueries_andycroll.png" alt="" width="500" height="304" /></a></li>
<li><a href="http://www.edmerritt.com/">Ed Merritt<img class="alignnone size-full wp-image-451"  src="http://zomigi.com/wp-content/uploads/2010/12/mediaqueries_edmerritt.png" alt="" width="500" height="222" /></a></li>
<li><a href="http://www.tenbytwenty.com/">Ten by twenty</a></li>
<li><a href="http://www.informationarchitects.jp/en/">iA</a></li>
<li><a href="http://lessframework.com/">Less Framework</a></li>
</ul>
<p>Know of any other great uses of media queries in the wild? Please share them in the comments!</p>
<h3>Update 1/25/11:</h3>
<p>I&#8217;ve learned about a few other resources for media queries/responsive layout inspiration:</p>
<ul>
<li><a href="http://mediaqueri.es/">Media Queries gallery</a></li>
<li><a href="http://www.mayfielddigital.co.uk/blog/web-round-up/best-responsive-web-design-examples-and-resources/">Web round up #11: The best responsive web design examples and resources</a></li>
<li><a href="http://www.smashingmagazine.com/2011/01/12/guidelines-for-responsive-web-design/">Responsive Web Design: What It Is and How To Use It</a></li>
</ul>
<p>Also, I&#8217;m bookmarking sites that I find to be nice examples of media queries on <a href="http://www.delicious.com/pixelsurge/mediaqueries+nicedesign">Delicious</a>.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://zomigi.com/blog/media-queries-presentation/' title='Media queries presentation at indieconf'>Media queries presentation at indieconf</a></li>
<li><a href='http://zomigi.com/blog/essential-considerations-for-crafting-quality-media-queries/' title='Essential considerations for crafting quality media queries'>Essential considerations for crafting quality media queries</a></li>
<li><a href='http://zomigi.com/blog/theres-already-a-book-on-responsive-web-design-want-to-win-it/' title='There&#8217;s already a book on responsive web design. Want to win it?'>There&#8217;s already a book on responsive web design. Want to win it?</a></li>
<li><a href='http://zomigi.com/blog/the-liquid-web-site-motherload/' title='The liquid web site motherload'>The liquid web site motherload</a></li>
<li><a href='http://zomigi.com/blog/why-browser-zoom-shouldnt-kill-flexible-layouts/' title='Why browser zoom shouldn&#8217;t kill flexible layouts'>Why browser zoom shouldn&#8217;t kill flexible layouts</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://zomigi.com/blog/examples-of-flexible-layouts-with-css3-media-queries/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>Adobe MAX slides and resources</title>
		<link>http://zomigi.com/blog/adobe-max/</link>
		<comments>http://zomigi.com/blog/adobe-max/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 22:40:26 +0000</pubDate>
		<dc:creator>Zoe Gillenwater</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[speaking]]></category>

		<guid isPermaLink="false">http://zomigi.com/?p=427</guid>
		<description><![CDATA[Download the slides for my presentation on Designing with CSS3 Effectively and Efficiently for Adobe MAX, as well as get links to related resources on CSS3 effects, benefits, and media queries.]]></description>
			<content:encoded><![CDATA[<p>I just finished speaking at <a href="http://usa10.webdirections.org/">Adobe MAX</a> on &#8220;Designing with CSS3 Effectively &amp; Efficiently,&#8221; the latest iteration of the talk I gave at <a href="../blog/web-directions-usa/">Web Directions USA</a>, the <a href="../blog/css-summit-2010/">CSS Summit</a>, and <a href="../blog/convergese-2010-and-upcoming-conferences/">ConvergeSE</a>.  I talked about how CSS3 is about more than making things look pretty   (though it’s really good at that too). Many CSS3 techniques can reduce   your development times, decrease page loading times, improve usability,   and increase the adaptability of your pages to different devices   (including iPads, iPhones, and Android smart phones). I showed examples of the pieces of CSS3  you  can add to your web sites right now and how they might benefit your   projects in tangible ways. I included a case study of a real site&#8217;s loading time and appearance  before and after CSS3, plus an example page built using media queries to  improve its appearance and usability at different screen sizes.</p>
<p>You can view the slides on <a href="http://www.slideshare.net/zomigi/designing-with-css3-effectively-efficiently">SlideShare</a>, or download the slides here:</p>
<p><a href="/downloads/Effective-Efficient-Design-CSS3_102610-AdobeMAX.pdf">Designing with CSS3 Effectively &amp; Efficiently (PDF, 3.3 mb)</a></p>
<p>Here are several links to related resources that I couldn&#8217;t put in  the slides but which you might find useful.<img  src="../wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" /></p>
<h3>Beginner CSS3 Articles</h3>
<ul>
<li><a href="http://www.smashingmagazine.com/2010/06/17/start-using-css3-today-techniques-and-tutorials/">Start  Using CSS3 Today: Techniques and Tutorials</a></li>
<li><a href="http://www.smashingmagazine.com/2009/10/26/modern-css-layouts-the-essential-characteristics/">Modern  CSS Layouts: The Essential Characteristics</a></li>
<li><a href="http://www.smashingmagazine.com/2010/05/06/modern-css-layouts-part-2-the-essential-techniques/">Modern  CSS Layouts, Part 2: The Essential Techniques</a></li>
<li><a href="http://www.alistapart.com/articles/prefix-or-posthack/">Prefix   or Posthack</a></li>
</ul>
<p><span id="more-427"></span></p>
<h3>Benefits of CSS3</h3>
<ul>
<li><a href="http://www.awayback.com/css3-and-veer-navigation/">CSS3 and  Veer navigation</a></li>
<li><a href="http://www.position-absolute.com/articles/how-to-get-css3-box-shadow-accepted-as-a-viable-option-at-your-workplace/">How  to: Get CSS3 box-shadow and border-radius accepted as a viable option  at your workplace</a></li>
</ul>
<h3>Media Queries</h3>
<ul>
<li><a href="http://www.quirksmode.org/mobile/viewports2.html">A tale of two viewports &#8211; part two</a></li>
<li><a href="http://davidbcalhoun.com/2010/viewport-metatag">The  viewport metatag (Mobile web part 1)</a></li>
<li><a href="http://www.quirksmode.org/blog/archives/2010/04/the_orientation.html">The  orientation media query</a></li>
<li><a href="http://mislav.uniqpath.com/2010/04/targeted-css/">Detecting  device size &amp; orientation in CSS</a></li>
<li><a href="http://www.lukew.com/ff/entry.asp?1142">Designing for the Retina Display (326ppi)</a></li>
<li><a href="http://www.protofluid.com/">Protofluid</a></li>
<li><a href="http://code.google.com/p/css3-mediaqueries-js/">css3-mediaqueries-js</a></li>
<li><a href="https://www.adobe.com/devnet/dreamweaver/articles/dw_html5_pt3.html">Dreamweaver CS5 media queries</a></li>
</ul>
<h3>Flexible Layouts</h3>
<ul>
<li><a href="http://www.zomigi.com/blog/essential-resources-for-creating-liquid-and-elastic-layouts/">70+  essential resources for creating liquid and elastic layouts</a></li>
<li><a href="http://www.flexiblewebbook.com/">Flexible Web Design: Creating Liquid and Elastic Layouts with CSS</a></li>
</ul>
<h3>Performance</h3>
<ul>
<li><a href="http://www.phpied.com/the-performance-business-pitch/">The performance business pitch</a></li>
<li><a href="http://googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html">Using site speed in web search ranking</a></li>
<li><a href="http://radar.oreilly.com/2009/06/bing-and-google-agree-slow-pag.html">Bing and Google Agree: Slow Pages Lose Users</a></li>
</ul>
<p>Finally, if you&#8217;re interested in learning more about my book, <a href="http://www.stunningcss3.com/">Stunning CSS3: A Project-based Guide to the Latest in CSS</a>, head on over to <a href="http://www.stunningcss3.com/">www.stunningcss3.com</a>.   That&#8217;s where the example files for the media query site I showed  during  my presentation will eventually be hosted. For now, check out  the CSS  used on the site to see a wide variety of CSS3 techniques in  use.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://zomigi.com/blog/web-directions-usa/' title='Web Directions USA slides and resources'>Web Directions USA slides and resources</a></li>
<li><a href='http://zomigi.com/blog/media-queries-presentation/' title='Media queries presentation at indieconf'>Media queries presentation at indieconf</a></li>
<li><a href='http://zomigi.com/blog/maintainable-efficient-css/' title='Highly Maintainable, Efficient, and Optimized CSS'>Highly Maintainable, Efficient, and Optimized CSS</a></li>
<li><a href='http://zomigi.com/blog/css-summit-2010/' title='CSS Summit 2010 slides and resources'>CSS Summit 2010 slides and resources</a></li>
<li><a href='http://zomigi.com/blog/convergese-2010-and-upcoming-conferences/' title='ConvergeSE 2010 and upcoming conferences'>ConvergeSE 2010 and upcoming conferences</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://zomigi.com/blog/adobe-max/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Web Directions USA slides and resources</title>
		<link>http://zomigi.com/blog/web-directions-usa/</link>
		<comments>http://zomigi.com/blog/web-directions-usa/#comments</comments>
		<pubDate>Thu, 23 Sep 2010 00:43:35 +0000</pubDate>
		<dc:creator>Zoe Gillenwater</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[speaking]]></category>

		<guid isPermaLink="false">http://zomigi.com/?p=409</guid>
		<description><![CDATA[Download the slides for my presentation on Effective and Efficient Design with CSS3 for Web Directions USA, as well as get links to related resources on CSS3 effects, benefits, and media queries.]]></description>
			<content:encoded><![CDATA[<p>I just finished speaking at <a href="http://usa10.webdirections.org/">Web Directions USA</a> on &#8220;Effective &amp; Efficient  Design with CSS3,&#8221; the latest iteration of an the talk I gave at the <a href="../blog/css-summit-2010/">CSS Summit</a> and <a href="../blog/convergese-2010-and-upcoming-conferences/">ConvergeSE</a>. I talked about how CSS3 is about more than making things look pretty  (though it’s really good at that too). Many CSS3 techniques can reduce  your development times, decrease page loading times, improve usability,  and increase the adaptability of your pages to different devices  (including iPads and iPhones). I showed examples of the pieces of CSS3 you  can add to your web sites right now and how they might benefit your  projects in tangible ways. I included a case study of a real site before and after CSS3, plus an example page built using media queries to improve its appearance and usability at different screen sizes.</p>
<p>You can view the slides on <a href="http://www.slideshare.net/zomigi/effective-and-efficient-design-with-css3">SlideShare</a>, or download the slides here:</p>
<p><a href="/downloads/Effective-Efficient-Design-CSS3_100923-WDUSA.pdf">Effective &amp; Efficient Design with CSS3 (PDF, 2.9 mb)</a></p>
<p>Here are several links to related resources that I couldn&#8217;t put in  the slides but which you might find useful.<img  src="../wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" /></p>
<h3>Beginner CSS3 Articles</h3>
<ul>
<li><a href="http://www.smashingmagazine.com/2010/06/17/start-using-css3-today-techniques-and-tutorials/">Start  Using CSS3 Today: Techniques and Tutorials</a></li>
<li><a href="http://www.smashingmagazine.com/2009/10/26/modern-css-layouts-the-essential-characteristics/">Modern  CSS Layouts: The Essential Characteristics</a></li>
<li><a href="http://www.smashingmagazine.com/2010/05/06/modern-css-layouts-part-2-the-essential-techniques/">Modern  CSS Layouts, Part 2: The Essential Techniques</a></li>
<li><a href="http://www.alistapart.com/articles/prefix-or-posthack/">Prefix   or Posthack</a></li>
</ul>
<p><span id="more-409"></span></p>
<h3>Benefits of CSS3</h3>
<ul>
<li><a href="http://www.awayback.com/css3-and-veer-navigation/">CSS3 and  Veer navigation</a></li>
<li><a href="http://www.position-absolute.com/articles/how-to-get-css3-box-shadow-accepted-as-a-viable-option-at-your-workplace/">How  to: Get CSS3 box-shadow and border-radius accepted as a viable option  at your workplace</a></li>
</ul>
<h3>Media Queries</h3>
<ul>
<li><a href="http://www.quirksmode.org/mobile/viewports2.html">A tale of two viewports &#8211; part two</a></li>
<li><a href="http://davidbcalhoun.com/2010/viewport-metatag">The  viewport metatag (Mobile web part 1)</a></li>
<li><a href="http://www.quirksmode.org/blog/archives/2010/04/the_orientation.html">The  orientation media query</a></li>
<li><a href="http://mislav.uniqpath.com/2010/04/targeted-css/">Detecting  device size &amp; orientation in CSS</a></li>
<li><a href="http://www.lukew.com/ff/entry.asp?1142">Designing for the Retina Display (326ppi)</a></li>
<li><a href="http://www.protofluid.com/">Protofluid</a></li>
</ul>
<h3>Flexible Layouts</h3>
<ul>
<li><a href="http://www.zomigi.com/blog/essential-resources-for-creating-liquid-and-elastic-layouts/">70+  essential resources for creating liquid and elastic layouts</a></li>
<li><a href="http://www.flexiblewebbook.com/">Flexible Web Design: Creating Liquid and Elastic Layouts with CSS</a></li>
</ul>
<p>Finally, if you&#8217;re interested in learning more about my book, <a href="http://www.stunningcss3.com/">Stunning CSS3: A Project-based Guide to the Latest in CSS</a>, head on over to <a href="http://www.stunningcss3.com/">www.stunningcss3.com</a>.  That&#8217;s where the example files for the media query site I showed during  my presentation will eventually be hosted. For now, check out the CSS  used on the site to see a wide variety of CSS3 techniques in use.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://zomigi.com/blog/adobe-max/' title='Adobe MAX slides and resources'>Adobe MAX slides and resources</a></li>
<li><a href='http://zomigi.com/blog/media-queries-presentation/' title='Media queries presentation at indieconf'>Media queries presentation at indieconf</a></li>
<li><a href='http://zomigi.com/blog/maintainable-efficient-css/' title='Highly Maintainable, Efficient, and Optimized CSS'>Highly Maintainable, Efficient, and Optimized CSS</a></li>
<li><a href='http://zomigi.com/blog/css-summit-2010/' title='CSS Summit 2010 slides and resources'>CSS Summit 2010 slides and resources</a></li>
<li><a href='http://zomigi.com/blog/convergese-2010-and-upcoming-conferences/' title='ConvergeSE 2010 and upcoming conferences'>ConvergeSE 2010 and upcoming conferences</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://zomigi.com/blog/web-directions-usa/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

