<?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>Paul Hayes &#187; Discussion</title>
	<atom:link href="http://www.paulrhayes.com/category/discussion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.paulrhayes.com</link>
	<description>The web musings and experiments of.</description>
	<lastBuildDate>Sun, 06 Nov 2011 11:31:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Thoughts on Responsive Enhancement</title>
		<link>http://www.paulrhayes.com/2010-10/thoughts-on-responsive-enhancement/</link>
		<comments>http://www.paulrhayes.com/2010-10/thoughts-on-responsive-enhancement/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 16:36:49 +0000</pubDate>
		<dc:creator>Paul Hayes</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Discussion]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[media-queries]]></category>
		<category><![CDATA[responsive-enhancement]]></category>

		<guid isPermaLink="false">http://www.paulrhayes.com/?p=116</guid>
		<description><![CDATA[An exploration into truly responsive design using media queries.]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://asyncjs.com/responsive-enhancement/">AsyncJS</a> in Brighton last night, <a href="http://adactio.com/journal/1700/">Jeremy Keith</a> gave an overview of “Responsive enhancement” — adapting a layout in response to browser or device capabilities. After considering why fixed width designs are so prevalent, via a brief history lesson, we delved into the tools and methods by which a truly responsive design can be implemented, focussing primarily on size constraints but also touching on troubles surrounding speed.</p>
<p>This article is a brain dump from last night’s event.</p>
<p>CSS3 media queries let us adapt CSS rules to different viewport properties; width, height, pixel ratio, even colour and monochrome screens (<a href="http://www.w3.org/TR/css3-mediaqueries/#contents">full list</a>). Aside: the Amazon Kindle (which uses webkit) reports itself as colour, with 8 levels, rather than monochrome.</p>
<p>The common process is to design for the desktop and use media queries to adapt downwards. On thinner devices content is linearised, navigation moves to the top or bottom, less important elements are sometimes hidden; everything is simplified down to the page’s core use case.</p>
<p>A number of tutorials have offered up the exact pixel-based media queries needed to target specific devices, a sort of restricted browser sniffing. This isn’t truly progressive, you can never cover all devices, and devices change, revisiting code for device iterations isn’t going to be fun.</p>
<p>Media queries don’t need to be pixel based either, changing a page layout based on ems will adapt content for larger text sizes. If the user’s text size is huge, our viewport is the same but we’ve got less space to play with, a linear mobile-like design might be more desirable.</p>
<p>This act of adapting downwards works for devices like the iPhone and iPad, but what about those that don’t support media queries? They’re going to get the full desktop version and it’s not going to be pretty.</p>
<p>Luke Wroblewski has suggested designing for <a href="http://www.lukew.com/ff/entry.asp?933">mobile first</a> (an excellent read). In terms of responsive enhancement that means creating your linear site as the baseline and building outwards around content, bringing in features as capabilities improve and constraints are relaxed. As the viewport widens, media queries can introduce columns, rather than remove them. It’s the same process but in the opposite direction.</p>
<p>All mobile devices and older browsers would get the simplified, linear design. This works on the assumption that desktop browsers support media queries, IE 8 and below do not, ergo they’ll be seeing the linear site design. This may be acceptable, but in the majority of cases IE will need some sort of hack to get the full featured version.</p>
<p>Using conditional IE comments an IE layout can be hacked in. The IE specific styles are likely to repeat existing code, undesirable, but unavoidable? This is still a one size fits all approach as IE will not adapt to screen or text size. For this we need a JS poly-fill, one that enables media queries in older browsers. There’s a library on Google Code that does just this, <a href="http://code.google.com/p/css3-mediaqueries-js/">CSS3 Media Queries JS</a>.</p>
<p>Building a page that can be linearised means putting the most important information first in the source code. This assumes that the context of “what is important” is similar on different devices. If the context is different, that makes a case for serving different content, usually via a standalone mobile site (which should always come with a link to the full version).</p>
<p>And on the topic of serving different content, there is also the speed problem. Hiding and showing parts of a page using CSS is great, but it doesn’t stop the slower mobile networks from downloading the unnecessary parts, including those huge background images. PPK has written an excellent article on <a href= "http://www.quirksmode.org/blog/archives/2010/08/combining_media.html">combining media queries and javascript</a> to avoid some of these caveats.</p>
<p>To round this brain dump off, I’ll recommend some other articles on the subject, which go into some of the technical aspects in a little more depth.</p>
<p>Ethan Marcotte’s “<a href="http://www.alistapart.com/articles/responsive-web-design/">Responsive Web Design</a>“<br />
Jeremy Keith’s “<a href="http://adactio.com/journal/1700/">Responsive Enhancement</a>“<br />
Yiibu’s “<a href="http://yiibu.com/articles/rethinking-the-mobile-web/">Rethinking the mobile web</a>“<br />
PPK’s “<a href="http://www.quirksmode.org/blog/archives/2010/09/state_of_mobile.html">State of Mobile Web Development</a>”</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paulrhayes.com/2010-10/thoughts-on-responsive-enhancement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time for some CSS debate</title>
		<link>http://www.paulrhayes.com/2009-03/time-for-some-css-debate/</link>
		<comments>http://www.paulrhayes.com/2009-03/time-for-some-css-debate/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 01:25:51 +0000</pubDate>
		<dc:creator>Paul Hayes</dc:creator>
				<category><![CDATA[Discussion]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[debate]]></category>
		<category><![CDATA[standards]]></category>

		<guid isPermaLink="false">http://www.fofronline.com/?p=41</guid>
		<description><![CDATA[Should CSS declare behaviour, or is this strictly the realm of JavaScript?]]></description>
			<content:encoded><![CDATA[<p>That’s the best pun I could think of, pretty lame to be honest. My first foray into shared experimental CSS (proprietary WebKit properties used to create a <a href="/2009-03/an-analogue-clock-using-only-css/">clock animation</a>) has fired up an interesting debate; where should the realm of cascaded style sheets end?<br />
<span id="more-41"></span></p>
<p>This clock experiment does not advocate such use of style sheets, it is instead used to demonstrate the capabilities and possibilities of WebKit’s transform and transition properties. It has inadvertently highlighted the controversial and unexpected nature by which web developers may use them. Should this cross-pollination of <em>behaviour definition</em> become standard? Is it risky? What might the side effects be?</p>
<p>Comments on the <a href="http://ajaxian.com/archives/creating-a-clock-in-css#comments">Ajaxian post</a> began the discussion, <em>Malic</em> opened the debate (this comment is particularly in reference to ‘transition’ rather than the more widely accepted ‘transform’):</p>
<blockquote><p>While this [is] interesting and maybe a little bit cool, I think it is inappropriate for Webkit to take CSS (even if only for itself) in this direction. CSS was created to define style. This seems more like a behavior to me and that belongs to the Javascript problem space. Going down the the road that Webkit is going, the question is — where do you stop? Just how much do you extend CSS to be? I think you run the risk of creating solutions for problems that have already been solved.</p></blockquote>
<p>This yielded some opposition but the majority supported the notion, <a href="http://www.travisalmand.net/">Travis Almand</a> champions the new transform property but strongly questions its counter-part:</p>
<blockquote><p>CSS should be a style guide, not a programming language.</p></blockquote>
<p>Before highlighting that the road to behaviour in CSS has already begun with the much used :hover, accompanied by :active, and :focus — <a href="http://www.w3.org/TR/css3-selectors/#useraction-pseudos">user action pseudo-classes</a>, <cite>agents sometimes change the rendering in response to user actions</cite>; response being the keyword.</p>
<p><a href="http://willpeavy.net/">Will Peavy</a> comments that these behaviours <del datetime="2009-03-30T18:54:02+00:00">wreak</del> reek of IE’s abandoned CSS expressions, and <a href="http://doggydoo.net/">edthered</a> asks:</p>
<blockquote><p>What happens when your CSS library and your javascript library start trying to do the same thing to the same element, or different things to the same element?</p></blockquote>
<p><a href="http://blogs.adobe.com/jd/2009/03/pervin_the_standards.html">John Dowdell</a> of Adobe has also weighed in with an <em>honest rant</em> that I heartily recommend reading, even if I’m slightly jealous that I cannot articulate my prose as well.</p>
<blockquote><p>The clock example shows that people will use technologies in unexpected ways. The creators of Usenet did not intend mass advertising. […] Stuffing the genie back inside the bottle is harder than looking carefully at the bottle before opening it.<br />
[…]<br />
We may not be able to persuasively articulate why this will eventually be considered a bad architectural decision. It’s like when vendors of email clients started talking about how wonderful it would be to add hidden graphics and scripting to the emails strangers send to you. Vague warnings of an unsound future are at a disadvantage to self-interested “But I wanna do it!!” evangelists.</p>
<p>It’s hard to persuasively document future risks. But encumbering HTML and CSS like this is not the way to bless your own multimedia engine.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.paulrhayes.com/2009-03/time-for-some-css-debate/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

