<?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>kuwamoto.org &#187; webstandards</title>
	<atom:link href="http://kuwamoto.org/category/webstandards/feed/" rel="self" type="application/rss+xml" />
	<link>http://kuwamoto.org</link>
	<description>music, technology, interfaces</description>
	<lastBuildDate>Tue, 03 Jan 2012 19:50:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Safari 4 First Thoughts</title>
		<link>http://kuwamoto.org/2009/02/25/safari-4-first-thoughts/</link>
		<comments>http://kuwamoto.org/2009/02/25/safari-4-first-thoughts/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 23:36:47 +0000</pubDate>
		<dc:creator>sho</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[webstandards]]></category>

		<guid isPermaLink="false">http://kuwamoto.org/?p=227</guid>
		<description><![CDATA[Just checked out the Safari 4 beta. Overall, it looks promising. The good JavaScript performance. I&#8217;m curious to know how they accomplished this (JIT compiler?) but I&#8217;m happy it&#8217;s here. More and more, client-side JavaScript is becoming something that can do heavy lifting. Tabbed browsing. The weird tab/title bar doesn&#8217;t appeal to me, but I [...]]]></description>
			<content:encoded><![CDATA[<p>Just checked out the Safari 4 beta. Overall, it looks promising.</p>
<h3>The good</h3>
<p><strong>JavaScript performance.</strong> I&#8217;m curious to know how they accomplished this (JIT compiler?) but I&#8217;m happy it&#8217;s here. More and more, client-side JavaScript is becoming something that can do heavy lifting.</p>
<p><strong>Tabbed browsing.</strong> The weird tab/title bar doesn&#8217;t appeal to me, but I can see its value. To me, the window needs to feel like it&#8217;s a container, and the tabs just screw that up for me. But the space savings is nice.</p>
<p><s><strong>Better keyboard navigation.</strong> Greatly appreciated by those of us who fill out forms on the web. Which is to say everyone.</s> turns out they had this in Safari 3.</p>
<p><strong>Better hints for location bar.</strong> Much better! The hints now work kind of like spotlight. Type stuff into the URL bar, and Safari will do its best to find a matching URL from any source it can think of (history, bookmarks, etc). The best guess is shown first (like Spotlight) and the rest are categorized. <strong>Problems:</strong> The location bar doesn&#8217;t seem to handle page titles, which is a shame. Also, if you mistype a URL and get a 404 or other error, it still shows up in history and can end up as the &#8220;top hit&#8221;. Uh&#8230; whoops!</p>
<p><strong>Embedded web fonts.</strong> It&#8217;s great that Safari is doing this. However, to be realistic (a) more browsers need to support this, and (b) someone needs to sort through all the legal issues having to do with font embedding.</p>
<h3>The meh</h3>
<p><strong>CSS animations.</strong> Back in 97, I was one of the folks working on the first version of Dreamweaver. At that point in time, the Netscape folks were coming up with new tags all the time. </p>
<p>When we told the Netscape folks that we were going to add a timeline to Dreamweaver to take advantage of the &lt;layer&gt; tag, they were surprised and happy. You see, the inspiration for the &lt;layer&gt; tag was this question: &#8220;how can we have the browser do the things that the Shockwave plugin does?&#8221; Fast forward to 2009 and replace &#8220;layer&#8221; with &#8220;CSS animations&#8221; or &#8220;canvas&#8221; and replace &#8220;Shockwave&#8221; with &#8220;Flash&#8221;. </p>
<p>My opinion on all this? Meh. If you want to do everything that Flash does, use Flash. Or invent something radically new that blows HTML out of the water. Don&#8217;t bother bolting that stuff onto HTML/CSS.</p>
<p>In fact, if you&#8217;re going to bolt stuff onto CSS, focus on getting the basics of static presentation right. CSS layout is still incredibly difficult (way harder than tables were). You have to do hours of Google research just to get a usable two column layout.</p>
<p><strong>Top Sites.</strong> The top sites UI feels overly glitzy to me, and for no good reason. The slightly curved appearance implies (to my eye) that I should be able to rotate my view to the left and the right to see more sites. Which you can&#8217;t do, as far as I can tell.</p>
<p><strong>Bookmark Sidebar / Cover Flow.</strong> I like Cover Flow, but it&#8217;s getting to the point where I can&#8217;t tell the Apple apps apart. iTunes has a sidebar on the left, a list of stuff on the right, which can include a Cover Flow view and a list below. Same with the Finder. Same with the browser. Same with&#8230; </p>
<p>Maybe I&#8217;m just thinking about this too abstractly, but it bothers me that so many of the Apple apps are starting to feel the same as each other. Not so long ago, iTunes was different than the Finder, which was different than iPhoto. Now, you have cover flow in the Finder and with Quick Look, you can play the song right from there. </p>
<p>So I don&#8217;t know. I&#8217;m kind of torn. Consistency is nice, but too much consistency leads to every single thing looking exactly the same. It feels a little bit like MS Windows UI right around when XP came out. Tree views were pretty general, and a lot of applications fit into the pattern of &#8220;tree view on left, detail view on right&#8221;, so that&#8217;s what everyone did.</p>
<p>Maybe it will grow on me. Or maybe they&#8217;ll iron out the kinks. (single clicking on a bookmark in the sidebar doesn&#8217;t navigate you to the page. It shows you a &#8220;category&#8221; with a single bookmark in it. Double clicking on the bookmark in the sidebar lets you rename the bookmark. The only way to navigate to that bookmark, as far as I can tell, is to click on the bookmark, and then click on the image of the website in cover flow, or else double click on the bookmark in the bottom pane below cover flow. I mean&#8230; cover flow is pretty, but isn&#8217;t single clicking a bookmark more important?)</p>
<h3>The WTF?</h3>
<p><strong>Color profile support.</strong> They claim to be the <s>first</s> only one to support this, but doesn&#8217;t Firefox already do this? Is the issue that it is turned off by default? Or does Safari handle colors in a significantly better way than Firefox?</p>
]]></content:encoded>
			<wfw:commentRss>http://kuwamoto.org/2009/02/25/safari-4-first-thoughts/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>CSS is too hard</title>
		<link>http://kuwamoto.org/2006/04/26/css-is-too-hard/</link>
		<comments>http://kuwamoto.org/2006/04/26/css-is-too-hard/#comments</comments>
		<pubDate>Wed, 26 Apr 2006 22:28:06 +0000</pubDate>
		<dc:creator>sho</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[webdesign]]></category>
		<category><![CDATA[webstandards]]></category>

		<guid isPermaLink="false">http://kuwamoto.org/2006/04/26/css-is-too-hard/</guid>
		<description><![CDATA[I used to think of myself as knowing a lot about CSS. For starters, I&#8217;d been responsible for the CSS implementation in Dreamweaver. I was also a member of the W3C CSS working group. I wasn&#8217;t a major contributor (I didn&#8217;t author any of the chapters of the spec, for example), but I thought I [...]]]></description>
			<content:encoded><![CDATA[<p>I used to think of myself as knowing a lot about CSS. For starters, I&#8217;d been responsible for the CSS implementation in Dreamweaver. I was also a member of the W3C CSS working group. I wasn&#8217;t a major contributor (I didn&#8217;t author any of the chapters of the spec, for example), but I thought I knew the spec pretty well.</p>
<p>It&#8217;s been a while since I&#8217;ve touched CSS, and in coming up with the design for this blog, I was reminded again how difficult it is to use CSS to get the layout you want. It was <em>incredibly</em> difficult. I couldn&#8217;t get it to work and I ended up having to google around to figure out how other people had done their page layouts.</p>
<p>Does it have to be this way? Shouldn&#8217;t a reasonably smart person who has read the spec be able to create a layout without referring to a guru?</p>
<p><span id="more-60"></span></p>
<h2 class="separator">~</h2>
<h3>Tables vs CSS</h3>
<p>The general idea of using CSS for layout is absolutely right. CSS lets you separate presentation from content, which is a good thing. The general idea of using tables for layout is wrong for exactly the same reason. It intermixes content with presentation, and besides, tables were originally meant to represent tabular data. There is another, more subtle reason why CSS is better than tables for layout: accessibility. With CSS, you can order your content in the preferred order for screen readers, and then use CSS to dictate where everything should go. With tables, the layout dictates document order.</p>
<p>However, there are some things that are trivial to do with tables that are mind-bendingly difficult with CSS. A lot of it has to do with what I&#8217;ll call float abuse.</p>
<h3>Float abuse</h3>
<p>There are a number of ways that people have found to create two and three column layouts that are popular on the web. Most of them rely on <code>display: float</code>.</p>
<p>Floats were originally intended to be used for floating elements such as sidebars.<span class="leftquote">This is an example of a traditional use of float.</span>They were not specifically designed to handle the overall layout of a page. Using floats to handle the overall layout of a page is not quite as egregious as table abuse, but there are similarities.</p>
<p>One of the problems with using floats to do overall layout is that they have significantly different rules for how margins are handled when compared with inline or block elements. If you were designing a system from scratch to define web layouts, would you purposefully make it so that the left column had different rules for margin handling than the right column? Probably not. Yet that&#8217;s what you get with floats.</p>
<p>The reason that margins need to be treated differently for floats is clear when you consider the original use case. Here&#8217;s a diagram from the CSS2 spec:</p>
<div class="figure">
<a href="http://www.w3.org/TR/REC-CSS2/visuren.html#floats"><img alt="diagram showing how margins work with floats" src="http://www.w3.org/TR/REC-CSS2/images/floateg.gif"></a></div>
<p>However, when you use floats to do a multi column layout, look at what happens to the margins. Let&#8217;s assume that A, B and C each have a top and bottom margin of 10px. Let&#8217;s also assume that B is floated left. In this case, the margins of A and C collapse, but the margin of B does not.</p>
<div class="figure"><img alt="diagram showing how margins get weird with floats" src="http://examples.kuwamoto.org/CSS/float.png"></div>
<p>Worse yet, some of the wrapping rules of floats can lead to situations like this:</p>
<div class="figure"><img alt="diagram showing how margins get weird with floats" src="http://examples.kuwamoto.org/CSS/float2.png"></div>
<p>As bad as tables are, you rarely get yourself into situations like this with tables. My belief is that all these problems occur because floats were never designed to serve this purpose in the first place.</p>
<h3>How should it work?</h3>
<p>Bert Bos once mentioned to me that the CSS group had discussed doing something within CSS to handle overall layout. I don&#8217;t know what the syntax was that was being thrown around at the time, but it looks like there has been some <a href="http://www.w3.org/TR/2005/WD-css3-layout-20051215/">progress on that front in the CSS3 spec</a>. The current proposal seems a bit bizarre to me, but I am incredibly happy that they are looking at this issue. FWIW, my personal preference would be to introduce @ rules to do a container based layout hierarchy:</p>
<pre>@layout {
    name: "threecol";
    type: vertical;
    width: 100%;
    height: 100%;
    children:
        @layout {
            name: "headerArea";
            width: 100%;
            height: 40px;
        },
        @layout {
            type: horizontal;
            width: 100%;
            height: 100%;
            children:
                @layout {
                    name: "leftArea";
                    width: 150px;
                    height: 100%;
                },
                @layout {
                    name: "mainArea";
                    width: 100%;
                    height: 100%;
                }
        }
}

#header {
    layout: "headerArea";
}

#sidebar {
    layout: "leftArea";
}

#content {
    layout: "mainArea";
}
</pre>
<p>I&#8217;m sure that the above psuedo-CSS has lots of problems, but the general gist is that I want to think about layout in terms of containment, not in terms of slots. But in any event, anything is better than thinking about floats!!</p>
<h3>When to be practical, and when not to be</h3>
<p>The main thing standing in the way of a new, better syntax for page layout is the real world. Can the W3C create a proposal that a whole consortium of companies agree to? Can we get this implemented in the browsers?</p>
<p>These are good questions, and for the foreseeable future, we may have to live with what CSS2 offers us. However, I want to make sure that pragmatism doesn&#8217;t lead to complacency. Is it great that I can now do a web page layout using standards-based CSS? Absolutely. Does CSS seem easy enough for the kinds of things that people want to do with it? Absolutely not! Laying out a web page in CSS is mind-bendingly hard. It shouldn&#8217;t be that way. People who create web pages should be jumping up and down asking for something better.<br />
]]></content:encoded>
			<wfw:commentRss>http://kuwamoto.org/2006/04/26/css-is-too-hard/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

