<?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>Mert TOL &#187; Web</title>
	<atom:link href="http://www.merttol.com/category/articles/web/feed" rel="self" type="application/rss+xml" />
	<link>http://www.merttol.com</link>
	<description></description>
	<lastBuildDate>Mon, 12 Sep 2011 11:51:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>What Does “Support” Mean?</title>
		<link>http://www.merttol.com/articles/web/what-does-support-mean.html</link>
		<comments>http://www.merttol.com/articles/web/what-does-support-mean.html#comments</comments>
		<pubDate>Fri, 12 Feb 2010 01:01:29 +0000</pubDate>
		<dc:creator>Mert TOL</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML and XHTML]]></category>
		<category><![CDATA[Web Accessibility]]></category>
		<category><![CDATA[Web Usability]]></category>

		<guid isPermaLink="false">http://www.merttol.com/?p=1358</guid>
		<description><![CDATA[Support does not mean that everybody gets the same thing.]]></description>
			<content:encoded><![CDATA[<p><span class="drop-cap">U</span>nfortunately for us web designers and developers, not all web surfers use the latest and greatest versions of their browsers. Some folks are hesitant to upgrade, others don’t know they should upgrade, and yet others have hardware that is outdated to a point where upgrading is not an option.</p>
<p>One fear organizations often have when they consider moving to a CSS-based approach is whether doing so will alienate these users. The reality, though, is that a properly implemented web-standards method of web development will actually make your site more accessible to users with older browsers. You see, in the first era of web development (which lasted throughout the ’90s), we were forced to make hard choices about which browsers we would support. The vast differences between browsers meant we needed to rewrite most aspects of each site for each one, and this was only practical to do for a few choice browsers.</p>
<div id="image-cap-left" style="width:370px;"><img src="http://www.merttol.com/web/wp-content/uploads/2010/02/mosaic-browser-plaque-ncsa.jpg" alt="Mosaic Browser Plaque NCSA" title="Mosaic Browser Plaque NCSA" width="370" height="490" /></p>
<p class="caption">Plaque commemorating the creation of Mosaic web browser by Eric Bina and Marc Andreessen, new NCSA building, University of Illinois at Urbana-Champaign.</p>
<p class="caption">Netscape Navigator was later developed by many of the original Mosaic authors; however, it intentionally shared no code with Mosaic. Netscape Navigator’s code descendant was Mozilla.</p>
</div>
<p>Modern web development (using web standards), on the other hand, allows us to support all browsers—at least in some capacity. And when we refer to all browsers, we mean all. This includes the version of Mosaic released in the early ’90s all the way up to today’s browsers, browsers on alternative devices (cell phones, PDAs, game consoles, etc.), and even browsers that haven’t been imagined yet and that will show up on the devices that reach the public in 2009. Whether to exclude a browser is not a choice we have to make. </p>
<p>Instead, we need to consider what “support” actually means. In the past, people have taken &#8220;support&#8221; to mean &#8220;everybody gets the same thing.&#8221; Support does not mean that everybody gets the same thing. Expecting two users using different browser software to have an identical experience fails to embrace or acknowledge the heterogeneous essence of the Web. In fact, requiring the same experience for all users creates an artificial barrier to participation. Availability and accessibility of content should be our key priority. </p>
<p>If we support Internet Explorer 6 and Netscape 4, then the site will look virtually identical in both browsers—and so on. Thus, web designers and developers learned to use a “lowest common denominator” approach, using only the features of XHTML, CSS, JavaScript, and so forth that worked well in the oldest, poorest browser they’d chosen to support. But this thinking is flawed in that it offers benefits to no one.</p>
<blockquote>
<p>Consider television. At the core: TV distributes information. A hand-cranked emergency radio is capable of receiving television audio transmissions. It would be counterproductive to prevent access to this content, even though it’s a fringe experience.</p>
<p>Some viewers still have black-and-white televisions. Broadcasting only in black-andwhite—the “lowest common denominator” approach—ensures a shared experience but benefits no one. Excluding the black-and-white television owners—the “you must be this tall to ride” approach—provides no benefit either. </p>
<p>An appropriate support strategy allows every user to consume as much visual and interactive richness as their environment can support. This approach—commonly referred to as progressive enhancement—builds a rich experience on top of an accessible core, without compromising that core.</p>
<p class="textright">Nate Koechley — A Senior Web Developer at Yahoo!</p>
</blockquote>
<p>Broadcast television offers full color. It offers Dolby Pro Logic surround sound. It offers high-definition resolution and clarity. If your television supports these technologies, you get the richest TV experience possible. If it doesn’t, your experience will not be enhanced—but you will still get the core content of the television program. This is very much the same approach the web standards movement applies to the Web.</p>
<p>All browsers, no matter what device they’re on, how old they are, or how technologically inferior they are, ought to get the core content of the page (in most cases, this means text, images, etc.). The latest and greatest browser will get the richest experience. Everything else will be somewhere in between.</p>
<h2>Development Browser</h2>
<p>Deciding which web browser you will use as you develop CSS-based sites is a significant choice. Although different schools of thought exist, most web designers agree that developing in a solid, reliable, standards-compliant browser (such as Firefox or Safari) is best. This lets you focus on doing things the “right” way through most of your development. Then, you can go back after the fact and provide workarounds for less-ideal browsers (such as Internet Explorer). Trying to develop to the lesser browsers as you go tends to result in more workarounds than necessary and code that is less clean.</p>
<p>Your mileage may vary, but we recommend using Firefox as your primary development browser, not only because of its great standards support, but also because of the many great extensions available for web developers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.merttol.com/articles/web/what-does-support-mean.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Checklist for Better Web Graphics</title>
		<link>http://www.merttol.com/articles/web/checklist-for-better-web-graphics.html</link>
		<comments>http://www.merttol.com/articles/web/checklist-for-better-web-graphics.html#comments</comments>
		<pubDate>Tue, 12 Jan 2010 16:19:50 +0000</pubDate>
		<dc:creator>Mert TOL</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Web Accessibility]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[Web Usability]]></category>

		<guid isPermaLink="false">http://www.merttol.com/?p=1323</guid>
		<description><![CDATA[Graphics are critical in defining the ambiance, appeal, and professionalism of a site. While we try to deliver engaging graphics, we must also weigh the tradeoff of increasing the download times that heavy use of graphics can entail.]]></description>
			<content:encoded><![CDATA[<p><span class="drop-cap">G</span>raphics are critical in defining the ambiance, appeal, and professionalism of a site. While we try to deliver engaging graphics, we must also weigh the tradeoff of increasing the download times that heavy use of graphics can entail. Saving images in the proper format, minimizing image sizes, and using graphics appropriately can go a long way toward minimizing download times.</p>
<p>Use this navigation and jump directly to content : </p>
<p class="anchor"><a href="#jpg">{JPG}</a> <a href="#gif">{GIF}</a> <a href="#png">{PNG}</a> <a href="#combination-and-acquiring Images">{Combination and Acquiring Images}</a> <a href="#creating-and-editing-images-with-effects-and-filters">{Creating and Editing Images with Effects and Filters}</a> <a href="#background-images">{Background Images}</a> <a href="#general">{General}</a></p>
<h2><a name="jpg"></a>JPG—Did you:</h2>
<ol class="alpha">
<li>
<p>Save photographs and other continuous tone images as JPGs, unless the images need transparency or animation?</p>
</li>
<li>
<p>Export JPGs at the lowest compression that still looks reasonably good on a web page?</p>
</li>
<li>
<p>Minimize JPG file size by adding a small amount of blur?</p>
</li>
<li>
<p>Avoid saving over the original (master) JPG?</p>
</li>
</ol>
<h2><a name="gif"></a>GIF—Did you:</h2>
<ol class="alpha">
<li>
<p>Save line-based images with areas of solid color (such as cartoons, line art, and graphic text) as GIFs?</p>
</li>
<li>
<p>Select an appropriate GIF palette, either a web-snap or a non-safe adaptive palette?</p>
</li>
<li>
<p>Explore transparent image backgrounds so that images no longer appear to be rectangles?</p>
</li>
<li>
<p>Turn on dithering if there are more than 256 colors in an image?</p>
</li>
<li>
<p>Specify interlacing, when appropriate?</p>
</li>
<li>
<p>Keep in mind the file size implications of excessive colors, vertical stripes, anti-aliasing, gradients, dithering, and textures?</p>
</li>
<li>
<p>Store a photograph as a GIF only if it needs transparency or animation, and then use a 256-color adaptive palette with dithering turned on?</p>
</li>
</ol>
<h2><a name="png"></a>PNG Images—Did you:</h2>
<ol class="alpha">
<li>
<p>Use PNG format if you have a flat color image that needs more than 256 colors?</p>
</li>
<li>
<p>Remember that alpha transparency increases fi le sizes and may not be supported by all browsers?</p>
</li>
<li>
<p>Specify interlacing, when appropriate?</p>
</li>
<li>
<p>Store a photograph as a PNG only if it needs transparency or animation, and then use an appropriate palette with dithering turned on?</p>
</li>
<li>
<p>Use only compressed PNG files (not native Fireworks PNG files) on the web?</p>
</li>
</ol>
<h2><a name="combination-and-acquiring-images"></a>Combination and Acquiring Images—Did you:</h2>
<ol class="alpha">
<li>
<p>Avoid combining GIF-appropriate and JPG-appropriate art in a single image?</p>
</li>
<li>
<p>Use stock photos and clip art when appropriate?</p>
</li>
<li>
<p>Scrupulously obey copyright laws?</p>
</li>
<li>
<p>Use screen capture software to acquire screen prints?</p>
</li>
<li>
<p>Scan photos at the appropriate resolution?</p>
</li>
<li>
<p>When possible, convert scanned images to vector format before resizing?</p>
</li>
<li>
<p>Use a digital camera rather than a fi lm-based camera, as appropriate?</p>
</li>
</ol>
<h2><a name="creating-and-editing-images-with-effects-and-filters"></a>Creating and Editing Images with Effects and Filters—Did you:</h2>
<ol class="alpha">
<li>
<p>Use anti-aliasing correctly, to avoid halos?</p>
</li>
<li>
<p>Match colors across software packages?</p>
</li>
<li>
<p>Use dingbat typefaces for ornaments, bullets, and icons, and for smoother small shapes?</p>
</li>
<li>
<p>Use effects and filters appropriately to embellish the page while avoiding effect overkill?</p>
</li>
<li>
<p>Make sure that the light source for all 3-D elements on the page is at the same angle?</p>
</li>
<li>
<p>Test your effects on a lower-end computer system?</p>
</li>
<li>
<p>Contemplate using posterization, feathering, rounding, or putting an edge of some sort on a photo?</p>
</li>
</ol>
<h2><a name="background-images"></a>Background Images—Did you:</h2>
<ol class="alpha">
<li>
<p>Create background images that are subtle and of low contrast, so that foreground elements are the focus and are legible?</p>
</li>
<li>
<p>Plan foreground elements so that they show up well, even with a high-contrast background, either by locking them on appropriate areas of the background or by outlining them?</p>
</li>
<li>
<p>Create a background tile of appropriate dimensions so that seams don’t show?</p>
</li>
<li>
<p>Use full-screen background images judiciously, and plan them to be relatively small files?</p>
</li>
<li>
<p>Create a large background image so that it looks complete on small screens while, at the same time, avoids tiling on the larger ones?</p>
</li>
<li>
<p>Specify the image as scrolling or fixed, depending upon which effect you want?</p>
</li>
<li>
<p>Consider wrapping the “background” image in a table or <code>&lt;div&gt;</code> so that it is positioned where you want it on the page, without tiling?</p>
</li>
<li>
<p>Consider using table cell background colors to mask the background image in content areas?</p>
</li>
<li>
<p>Think about using table cell and <code>&lt;div&gt;</code> background colors to provide a colorblocked look without the use of background pattern at all?</p>
</li>
</ol>
<h2><a name="general"></a>General—Did you:</h2>
<ol class="alpha">
<li>
<p>Avoid gratuitous graphics?</p>
</li>
<li>
<p>Use an appropriate format: GIF, JPG, or PNG?</p>
</li>
<li>
<p>Reuse graphics throughout the site, whenever possible?</p>
</li>
<li>
<p>Crop or downsize images so that they display at the smallest reasonable size on the screen?</p>
</li>
<li>
<p>Use <code>height</code> and <code>width</code> attributes appropriately?</p>
</li>
<li>
<p>Use an <code>alt</code> attribute on each image?</p>
</li>
<li>
<p>Use visual echoes by repeating shapes, colors, and mood?</p>
</li>
<li>
<p>Avoid web clichés?</p>
</li>
<li>
<p>Think about the alternatives for image borders?</p>
</li>
<li>
<p><a href="http://www.merttol.com/notes/name-by-function-not-visual-attributes.html">Name images by function, rather than by visual attributes?</a></p>
</li>
<li>
<p>Avoid animation unless to draw attention to the area you want to be the focus for your visitors?</p>
</li>
<li>
<p>Choose an appropriate animation format?</p>
</li>
</ol>
<p>Don’t forget to look at if you already didn&#8217;t see “<a href="http://www.merttol.com/articles/web/design-checklist.html">All In One Design Checklist</a>” and &#8220;<a href="http://www.merttol.com/articles/web/checklist-for-better-forms.html">Checklist for Better Forms</a>&#8221; after this article.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.merttol.com/articles/web/checklist-for-better-web-graphics.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Too Light for Print</title>
		<link>http://www.merttol.com/articles/web/code/too-light-for-print.html</link>
		<comments>http://www.merttol.com/articles/web/code/too-light-for-print.html#comments</comments>
		<pubDate>Fri, 01 Jan 2010 03:39:00 +0000</pubDate>
		<dc:creator>Mert TOL</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Printing]]></category>
		<category><![CDATA[Web Usability]]></category>

		<guid isPermaLink="false">http://www.merttol.com/?p=1288</guid>
		<description><![CDATA[If you thought you had a reasonable amount of control over the color of your typography using CSS, you thought wrong.]]></description>
			<content:encoded><![CDATA[<p><span class="drop-cap">I</span>f you thought you had a reasonable amount of control over the color of your typography using CSS, you thought wrong. One of the absolute flakiest, inconsistent issues you will ever encounter in CSS is trying to get accurate color applied to your fonts. In all major browsers, certain color values are modified if the browser deems them to be “too light for print” and it will render a color that it thinks will be better suited for your output on a printed page.</p>
<div id="image-cap-left" style="width:161px;"><img src="http://www.merttol.com/web/wp-content/uploads/2009/12/safari-rgb-print-test.jpg" alt="safari-rgb-print-test" title="safari-rgb-print-test" width="161" height="460" />
<p class="caption"><strong>Clip</strong> from a print test showing where the break is between <em>rgb(107, 107, 107)</em> and <em>rgb(128, 128, 128)</em>.</p>
</div>
<p>Now the reason why the browser vendors have made this assumption is fairly obvious: printing light text on what is almost always white paper is largely unreadable, and it is sadly very rare that web authors will take the time to style their pages for print using an alternate print style sheet (if they ever style it for print at all). Furthermore, printing in pure black, devoid of any complex color mixing, can make printing much faster, because the printer doesn’t have to mix in any red, green, or blue ink and can focus on getting the task done. But what is maddening to the designer trying to achieve accurate color representation in print from their web pages is that all of the major browsers assume that they are smarter than you, and recolor the text based on their own inconsistent algorithms. If you wanted a string of text to appear very light gray in Firefox, too bad. You are getting black whether you like it or not. Let’s look at some of the problems you might encounter.</p>
<p>In Safari 3 (on the left-side), gray colors print fine up until <code>rgb(107, 107, 107)</code>. After that point there will be a strange conversion to a light gray shade, arguably the lightest gray you can get in text on Safari, between <code>rgb(108, 108, 108)</code> and <code>rgb(127, 127, 127)</code>. At <code>rgb(128, 128, 128)</code>, the text color then jumps to black and as you ascend the values toward an expected white color, Safari yields a progressive amount of additional lightness to the text until it finally winds up at around <code>rgb(171, 171, 171)</code>, where it should be <code>255</code> for all values.</p>
<p>This problem also occurs in the red, green, and blue colorspaces. If we fix red at <code>127</code>, about halfway between the minimum value of <code>0</code> and the maximum value of <code>255</code>, we get a dead zone between <code>rgb(127, 100, 100)</code> and <code>rgb(127, 127, 127)</code>. The same ratios happen starting at <code>rgb(100, 127, 100)</code> and at <code>rgb(100, 100, 127)</code>. Finally, Safari renders <code>rgb(0, 255, 255)</code>, <code>rgb(255, 0, 255)</code> and <code>rgb(255, 255, 0)</code> inconsistently from their adjacent color values.</p>
<p>Gecko browsers such as Firefox (before version 3), Camino, and Flock print the entire gray space in black. You cannot specify a light gray such as  <code>rgb(127, 127, 127)</code> or anything else. It will always default to pure black whether you like it or not. If you fix a color bucket at <code>0</code>, you will get semi-accurate color for the rest of the gamut, but the other color combinations will trend toward black text the lighter it gets. The exception here is Firefox 3, which will print your color exactly as specified. As of this writing, Firefox 3 is the only browser I&#8217;ve tested that gets the color matching between screen and print relatively correct.</p>
<p>Interestingly, the marker (the little bullet to the left of each list item) will display the correct color value in print for Firefox and Safari, even though the text itself won’t match! So at least here you can use the markers to see what the color was supposed to be…</p>
<p>In Opera 9, gray shades render accurately up until <code>rgb(185, 185, 185)</code>, and then higher values default to black. In the points tested, the same conversion to black happens in various other colorspaces at different points. For instance, color values higher than <code>rgb(127, 211, 211)</code>, <code>rgb(255, 156, 156)</code>, <code>rgb(87, 255, 255)</code>, <code>rgb(209, 209, 0)</code>, <code>rgb(193, 193, 127)</code> and <code>rgb(177, 177, 255)</code> will stop rendering their expected colors and just print black instead, thank you very much.</p>
<p>IE7 never gets any lighter than <code>rgb(108, 104, 102)</code> for grayscale, and the rest of the color spaces don’t seem to allow anything lighter than a midrange hue equivalent in any given color range.</p>
<p>Since all the major browsers have made the assumption that you’ve neglected to pay appropriate attention to your print output with regard to color and contrast, you have to live with that and deal with some fairly tricky constraints. One argument is to give in and just go for all black text on all white paper, and certainly there’s an argument for that in terms of readability and performance. But for that argument we should all be designing white web pages with black text too and just toss out all our assumptions about color theory, design, and inspiration. We know clearly that the primary function and goal for printing a page is for reading purposes, but what if you wanted to do something else. Something more artistic, perhaps? For truly accurate printing from the Web, you may want to stick with PDF or similar output. But there’s still plenty we can do with print using plain-old HTML and CSS, and it can be an interesting academic exercise to try to design within these constraints. Think of it as a challenge that will make your professional world that much more interesting! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.merttol.com/articles/web/code/too-light-for-print.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Styling with SVG</title>
		<link>http://www.merttol.com/articles/web/styling-with-svg.html</link>
		<comments>http://www.merttol.com/articles/web/styling-with-svg.html#comments</comments>
		<pubDate>Sat, 26 Dec 2009 20:23:38 +0000</pubDate>
		<dc:creator>Mert TOL</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[HTML and XHTML]]></category>
		<category><![CDATA[SVG]]></category>

		<guid isPermaLink="false">http://www.merttol.com/?p=1282</guid>
		<description><![CDATA[Since the CSS specification itself is inadequate to handle the complexities and specific requirements of styling images, SVG includes a number of style extensions.]]></description>
			<content:encoded><![CDATA[<p><span class="drop-cap">S</span>ince the CSS specification itself is inadequate to handle the complexities and specific requirements of styling images, SVG includes a number of style extensions.</p>
<p>SVG style property/value pairs may be presented directly within the content of the markup as attributes. At the same time, SVG style properties may be treated as part of style sheets in the same way CSS works.</p>
<p>Here are some more property options to help you code your next work of art, along with a brief description of the intent of each property’s function:</p>
<ol class="dot">
<li>
<p><code>alignment-baseline</code>: A text property that specifies alignment with respect to its parent element.</p>
</li>
<li>
<p><code>baseline-shift</code>: Repositions the baseline of text relative to its parent element, usually resulting in a subscript or superscript effect.</p>
</li>
<li>
<p><code>clip-path</code>: Points a URI to another SVG graphic to be used as a clipping path. This can be an ID reference (such as <code>#someClippingPath</code>) if the SVG is embedded within the same document.</p>
</li>
<li>
<p><code>clip-rule</code>: Takes one of three values: <code>inherit</code>, <code>evenodd</code>, or <code>nonzero</code> (default). Without getting too deep into the details, imagine two concentric circles, with a <code>clip-rule</code> applied to the outermost circle. With <code>nonzero</code>, both circles would be filled. With <code>evenodd</code>, the inner circle would not be filled, resulting in an annulus.</p>
</li>
<li>
<p><code>color-interpolation</code>: Specifies which color space interpolation should occur in, with <code>auto</code>, <code>sRGB</code> (default), and <code>linearRGB</code> as possible values.</p>
</li>
<li>
<p><code>color-interpolation-filters</code>: Similar to <code>color-interpolation</code> but applied to filter effects.</p>
</li>
<li>
<p><code>color-profile</code>: Defines a color profile description. Can be used like an at-rule (<code>@color-profile</code>) or as a property.</p>
</li>
<li>
<p><code>color-rendering</code>: Tells the user agent to optimize speed or quality using the <code>optimizeSpeed</code> or <code>optimizeQuality</code> property.</p>
</li>
<li>
<p><code>dominant-baseline</code>: In typography, used to determine the baseline of the script with the dominant run. Values could be alphabetic for Western contexts, mathematical for math formulas, and ideographic for the East Asian scripts Chinese, Japanese, Korean, and Vietnamese.</p>
</li>
<li>
<p><code>enable-background</code>: Describes how backgrounds are accumulated, using the property <code>new</code> or accumulate, or an x/y offset value.</p>
</li>
<li>
<p><code>fill</code>: Paints the interior of a given element.</p>
</li>
<li>
<p><code>fill-opacity</code>: Sets the opacity of the fill color.</p>
</li>
<li>
<p><code>fill-rule</code>: Similar to <code>clip-rule</code>, using <code>evenodd</code> or <code>nonzero</code> (default) to set the fill behavior.</p>
</li>
<li>
<p><code>filter</code>: Can set a URL to point to a filter that would be applied to an object.</p>
</li>
<li>
<p><code>flood-color</code>: Indicates a color value to use to flood a filter subregion.</p>
</li>
<li>
<p><code>flood-opacity</code>: Sets an opacity value to flood a filter subregion.</p>
</li>
<li>
<p><code>glyph-orientation-horizontal</code>: Controls glyph orientation when the inline-progression direction (set by <code>writing-mode</code>) is vertical relative to the reference orientation.</p>
</li>
<li>
<p><code>glyph-orientation-vertical</code>: Controls glyph orientation when the inline-progression-direction (set by <code>writing-mode</code>) is horizontal relative to the reference orientation.</p>
</li>
<li>
<p><code>image-rendering</code>: Tells the user agent to optimize speed or quality using the <code>optimizeSpeed</code> or <code>optimizeQaulity</code> property. (Look at <code>color-rendering</code>.)</p>
</li>
<li>
<p><code>kerning</code>: Adjusts length between glyphs.</p>
</li>
<li>
<p><code>lighting-color</code>: Defines a color for light sources that can be applied against SVG’s <code><feDiffuseLighting></code> and <code><feSpecularLighting></code> elements.</p>
</li>
<li>
<p><code>marker</code>: Shorthand property for <code>marker-end</code>, <code>marker-start</code>, and <code>marker-mid</code>.</p>
</li>
<li>
<p><code>marker-end</code>: Defines a marker or an arrow at the end of a path.</p>
</li>
<li>
<p><code>marker-mid</code>: Defines markers at all vertices except for the beginning and end markers.</p>
</li>
<li>
<p><code>marker-start</code>: Defines a marker or an arrow at the beginning of a path.</p>
</li>
<li>
<p><code>mask</code>: References a <code><mask></code> element to implement a path used for generating a mask effect.</p>
</li>
<li>
<p><code>opacity</code>: Sets the opacity of an object, using decimal values from <code>0</code> (fully transparent) to <code>1</code> (fully opaque). A value of <code>0.5</code> would be 50 percent opacity.</p>
</li>
<li>
<p><code>pointer-event</code>: Controls under what circumstances an object can become the target of pointer events.</p>
</li>
<li>
<p><code>shape-rendering</code>: Tells the user agent to optimize speed or quality using the <code>optimizeSpeed</code> or <code>crispEdges</code> property.</p>
</li>
<li>
<p><code>stop-color</code>: Sets a color to use at a gradient stop.</p>
</li>
<li>
<p><code>stop-opacity</code>: Sets an opacity used at a gradient stop.</p>
</li>
<li>
<p><code>stroke</code>: Describes the stroke effect applied to an object.</p>
</li>
<li>
<p><code>stroke-dasharray</code>: Sets pattern of dashes and gaps in a stroke.</p>
</li>
<li>
<p><code>stroke-dashoffset</code>: Sets how far into a stroke the dash pattern will begin.</p>
</li>
<li>
<p><code>stroke-linecap</code>: Sets the shape used at the end of open subpaths, using the values <code>butt</code>, <code>round</code>, and <code>square</code>.</p>
</li>
<li>
<p><code>stroke-linejoin</code>: Sets the shape of corners, using the values <code>miter</code>, <code>round</code>, and <code>bevel</code>.</p>
</li>
<li>
<p><code>stroke-miterlimit</code>: Sets a limit on the ratio of the miter length to <code>stroke-width</code>.</p>
</li>
<li>
<p><code>stroke-opacity</code>: Sets the opacity of the stroke.</p>
</li>
<li>
<p><code>stroke-width</code>: Sets the width of a stroke.</p>
</li>
<li>
<p><code>text-anchor</code>: Aligns text to a specified point, using the values <code>start</code>, <code>middle</code>, and <code>end</code>.</p>
</li>
<li>
<p><code>text-rendering</code>: Tells the user agent to optimize speed or quality using the <code>optimizeSpeed</code> or <code>optimizeLegibility</code> property.</p>
</li>
<li>
<p><code>writing-mode</code>: Determines which direction text flows; left to right, right to left, and/or top to bottom.</p>
</li>
</ol>
<h2>Browser Support</h2>
<p>SVG enjoys at least partial native support in modern versions of Gecko-based browsers such as Firefox, WebKit-based browsers such as Safari, and the Opera line of browsers since version 8. As you probably guessed, there are no versions of Microsoft Internet Explorer, including version 8, that support SVG.</p>
<h2>SVG and Microsoft Internet Explorer</h2>
<p>Fortunately for the IE users, there are excellent plug-ins that provide support for SVG. </p>
<p><em>As of 19 March 2009, Internet Explorer 8, the latest release of Windows Internet Explorer, is the only current major browser not to provide native SVG support.</em> Internet Explorer requires a plug-in to render SVG content. There are a number of plug-ins available to assist including:</p>
<ol class="alpha">
<li>
<p><a rel="external" href="http://www.adobe.com/svg/viewer/install/">Adobe SVG Viewer</a> from Adobe Systems plugin supports most of SVG 1.0/1.1. Zooming and panning of the image are also supported to enable viewing of any area of the SVG lying outside the visible area of its containing window, but scrolling is not supported. Adobe SVG Viewer is available for download from Adobe Systems free of charge. So, on 1 January 2009, Adobe Systems discontinued support for Adobe SVG Viewer. However, their motivations for discontinuing support included the fact that better options existed in the marketplace and that most browser vendors (save for the one big one) already feature native support for SVG.</p>
</li>
<li>
<p><acronym title="Google Chrome Frame is an open source plug-in designed for Internet Explorer.">Google Chrome Frame</acronym> from Google can support all web elements supported by Webkit, including SVG 1.0 and partially SVG 1.1.</p>
</li>
<li>
<p><a rel="external" href="http://www.examotion.com/index.php?id=product_player">RENESIS Player 1.0 for Internet Explorer</a> from <a rel="external" href="http://www.examotion.com/">examotion GmbH</a>, first released on April 2008, supports SVG 1.1 on IE 6.x and 7.x and is available for download free of charge.</p>
</li>
<li>
<p><a rel="external" href="http://www.savarese.com/software/svgplugin/">Ssrc SVG Plugin</a> from <a rel="external" href="http://www.savarese.com/">Savarese Software Research Corporation</a> is a plug-in for rendering SVG in Microsoft Internet Explorer (MSIE) versions 6, 7, and 8 on Windows XP, Server 2003, Vista, and Server 2008. In addition, the plug-in enables Internet Explorer to load Mozilla XUL applications.</p>
</li>
<li>
<p><a rel="external" href="http://www.corel.com/servlet/Satellite?pagename=Corel2/Products/Content&#038;pid=1047023276653&#038;cid=1047023286996">Corel SVG Viewer.</a></p>
</li>
<li>
<p><a rel="external" href="http://xmlgraphics.apache.org/batik/download.cgi">Batik, a widely deployed Java plugin.</a></p>
</li>
<li>
<p>Bitflash, an SVG viewer intended for mobile devices, which can be installed as an IE plugin.</p>
</li>
<li>
<p>Ikivo, an SVG viewer intended for mobile devices, which can be installed as an IE plugin.</p>
</li>
<li>
<p><a rel="external" href="http://gpac.sourceforge.net/">GPAC, targets SVGT 1.2</a>.</p>
</li>
</ol>
<h2>Related Resources</h2>
<p class="continue"><a rel="external" href="http://www.w3.org/Graphics/SVG/">W3C &#8211; Scalable Vector Graphics (SVG)</a></p>
<p class="continue"><a rel="external" href="http://www.w3.org/TR/SVG/">W3C &#8211; Scalable Vector Graphics (SVG) 1.1 Specification</a></p>
<p class="continue"><a rel="external" href="http://code.google.com/p/svgweb/">SVGweb</a> <em>SVG Web is a JavaScript library for Web developers, targeted at Internet Explorer and dependent on the presence of an installed Adobe Flash plugin on the client machine. SVG Web provides partial support for SVG 1.1, SVG Animation (SMIL), Fonts, Video and Audio, DOM and style scripting.</em></p>
<p class="continue"><a rel="external" href="http://svg.org/">SVG.org &#8211; Bringing the SVG Community Together</a></p>
<p class="continue"><a rel="external" href="http://www.planetsvg.com/">Planet SVG</a></p>
<p class="continue"><a rel="external" href="http://www.mozilla.org/projects/svg/">Mozilla SVG Project</a></p>
<p class="continue"><a rel="external" href="http://www.theregister.co.uk/2009/06/03/google_svg_internet_explorer/">Google to slip SVG into Internet Explorer</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.merttol.com/articles/web/styling-with-svg.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Introduction to CSS Escape Sequences</title>
		<link>http://www.merttol.com/articles/web/code/introduction-to-css-escape-sequences.html</link>
		<comments>http://www.merttol.com/articles/web/code/introduction-to-css-escape-sequences.html#comments</comments>
		<pubDate>Sat, 12 Dec 2009 19:56:28 +0000</pubDate>
		<dc:creator>Mert TOL</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML and XHTML]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.merttol.com/?p=1219</guid>
		<description><![CDATA[Regardless of where they appear, string values in CSS behave in a similar way. The most important thing to remember about them is that they are not HTML.]]></description>
			<content:encoded><![CDATA[<p><span class="drop-cap">R</span>egardless of where they appear, string values in CSS behave in a similar way. The most important thing to remember about them is that they are not HTML. This means, for instance, that inserting literal angle brackets without escaping them as HTML entity references (&lt; and &gt;) is perfectly legal. In other words, the rule:</p>
<pre>#example:before { content: "3 &lt; 5"; }</pre>
<p>would result in a pseudo-element whose contents are the five characters (including spaces) <code>&lt;</code> and not a broken HTML start tag. Similarly, this rule:</p>
<pre>#example:before { content: "&amp;lt;"; }</pre>
<p>results in a pseudo-element whose contents are the four characters <code>&amp;lt;</code> and not an HTML-escaped lessthan glyph. This tells us that the <code>&lt;</code> and <code>&amp;</code> characters are not treated specially by CSS string parsers, even though they are characters with special meaning in SGML-derived languages like HTML and XML.</p>
<p>Within CSS strings, the only character with any special meaning is the backslash (\). This character delimits the beginning of an <em>escape sequence</em>, a sequence of characters used to collectively represent a different character, in much the same way as the ampersand (<code>&amp;</code>) does in HTML code.</p>
<p>Escape sequences are useful because they allow style sheet authors to represent characters that would normally be ignored or interpreted differently by traditional CSS parsing rules. The most obvious example of this is representing a literal backslash in a CSS string. At first, you might think that the following CSS rule would produce a backslash at the start of every paragraph, but you’d be mistaken.</p>
<pre>p:before { content: "\"; }</pre>
<p>When a CSS parser reads the declaration in this rule, it thinks that the backslash is the start of an escape sequence, and so it ignores it. Next, it encounters a straightened double quote and, since this character is not a legal component in an escape sequence, it recognizes it as the end of the string value and returns. The result is an empty string, sans backslash: <code>""</code>.</p>
<p>To get the backslash to appear, we therefore need to <em>escape</em> it, or “undo” its special meaning. This is simple enough. We merely prepend the backslash with another one, like this:</p>
<pre>p:before { content: "\\"; }</pre>
<p>This time when a CSS parser reads the declaration in the rule, it finds the first backslash, switches into its “<em>escape sequence mode</em>,” finds a literal backslash character as part of the string value it is parsing, and then finds the end-of-value straightened quotation mark. The result is what we were originally after, and the value that the CSS parser returns to the renderer is a single backslash: &#8220;\&#8221;. Note that CSS makes no distinction between single-quoted or double-quoted strings, so in either case two backslashes are needed in code to output one.</p>
<p>A similar situation exists if you wish to produce a literal double-quote within a double-quoted string. Instead of writing <code>""";</code> you would write <code>"\"";</code> to tell the CSS parser to treat the second quote as part of a value instead of the end-of-value delimiter. Alternatively, you could use single quotes as the string delimiter (<code>content: '"';</code>).</p>
<p>After the starting backslash, only hexadecimal digits (the numerals <code>0</code> through <code>9</code> and the English letters <code>A</code> through <code>F</code>) are allowed to appear within an escape sequence. In such escape sequences, these digits always reference <acronym title="Actually, all CSS string escape sequences are really references to Universal Character Set (ISO-10646) encoded characters.">Unicode code points</acronym> regardless of the character set used in the style sheet itself. As a result, it’s possible to uniformly represent characters in a style sheet that are not possible to embed directly inside the style sheet itself.</p>
<p>Accented characters (like the “é” in résumé or café) is an example of one class of characters that would need to be escaped in a CSS string if the style sheet were encoded in plain ASCII instead of, say, UTF-8.</p>
<p>One useful application for this is to embed line breaks into generated content. The Unicode code point for the newline character is U+00000A. In a CSS string, this can be written as <code>\00000A</code>. In a way similar to the way a hex triplet for <code>color</code> values can be shortened, escape sequences can also be shortened by dropping any leading zeros from the code point, so another way to write a newline is <code>\A</code>. Here’s a CSS rule that separates the two words “Hello” and “world” with a newline, placing each on their own line.</p>
<pre>#example:before { content: "Hello\Aworld."; }</pre>
<p>Something to be careful of when using escape sequences in CSS strings is ending the escape sequence where you intend to. Observe what happens if our “Hello world” text changed to “Hello boy.”</p>
<pre>#example:before { content: "Hello\Aboy."; }</pre>
<p>Now, instead of a newline (code point <code>\A</code>), our escape sequence is a left-pointing double angle quotation mark, or (code point <code>\AB</code>). Our generated content now reads “Hello«oy.” This happens because the “B” in “boy” is interpreted as a hexadecimal digit. The escape sequence terminates at the next character, the “O,” because that letter isn’t also such a digit.</p>
<p>You can explicitly conclude an escape sequence in one of two ways. First, you can specify the sequence in full using all six hexadecimal digits (including leading zeros, if there are any). Second, you can append a space. The following two CSS rules are therefore equivalent:</p>
<pre>#example:before { content: "Hello\00000Aboy."; }
#example:before { content: "Hello\A boy."; }</pre>
<p>Knowing this, we can now split our earlier image caption example across two lines just where we want to. Pay close attention to the addition of the <code>white-space: pre;</code> declaration. Since we’re generating whitespace characters and in most situations all whitespace in HTML gets collapsed to a single space, the <code>white-space</code> declaration is needed to interpret the newline literally (as though all the generated content were inside a <code>&lt;pre&gt;</code> element).</p>
<pre>img[title]:before {
    content: attr(title) "<strong>\A</strong>Image retrieved from"
    attr(src);
    <strong>white-space: pre;</strong>
    display: block;
}</pre>
<h2>Translations</h2>
<p class="continue"><a href="http://www.elwebmaster.com/articulos/css-como-utilizar-secuencias-de-escape-en-tu-codigo">Spanish</a> (elwebmaster.com)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.merttol.com/articles/web/code/introduction-to-css-escape-sequences.html/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Choosing Between an FBML or IFrame</title>
		<link>http://www.merttol.com/articles/web/code/choosing-between-an-fbml-or-iframe.html</link>
		<comments>http://www.merttol.com/articles/web/code/choosing-between-an-fbml-or-iframe.html#comments</comments>
		<pubDate>Mon, 07 Dec 2009 01:37:39 +0000</pubDate>
		<dc:creator>Mert TOL</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Application Design]]></category>

		<guid isPermaLink="false">http://www.merttol.com/?p=1203</guid>
		<description><![CDATA[One of the strategic decisions that you need to make when you create your Facebook application is deciding whether to use FBML or an IFrame for your canvas page.]]></description>
			<content:encoded><![CDATA[<p><span class="drop-cap">O</span>ne of the strategic decisions that you need to make when you create your Facebook application is deciding whether to use FBML or an IFrame for your canvas page. The issue is more than just an implementation detail. In fact, it gets to the heart of the goals for your application.</p>
<p>FBML embraces the Facebook Platform and enables your application to become part of Facebook itself. IFrames, on the other hand, enable your Web application to function inside Facebook without coding an interface that works only inside a single context (Facebook).</p>
<p>The reasons for using FBML include the following:</p>
<ol class="alpha">
<li>
<p><strong>Has a consistent look and feel.</strong> When you use FBML, your application styles and controls automatically take on a Facebook look and feel, making it look identical to other Facebook apps. This consistency reduces the learning curve for your users and gives them instant familiarity and comfort with their surroundings.</p>
</li>
<li>
<p><strong>Uses FBML elements.</strong> FBML is filled with several tags, controls, and “widgets” that enable you to develop a rich app interface in minimal time.</p>
<p>Want to add a dashboard navigation menu? With FBML, you simply need to add an <code>fb:dashboard</code> tag. With IFrames, you need to code and style it all yourself.</p>
</li>
<li>
<p><strong>May offer improved performance.</strong> Facebook claims that performance is improved when you use FBML. However, that claim probably depends on the specifics of an application and is not necessarily a blanket statement.</p>
</li>
</ol>
<p>On the other hand, reasons you should consider using an IFrame approach include the following:</p>
<ol class="alpha">
<li>
<p><strong>Enables existing apps to get up and running quicker.</strong> If you have an existing Web app, you usually need to do very little to integrate into Facebook using an IFrame approach. Your application can perform, more or less, as is within the confines of the IFrame. If you port to FBML, you are going to have to rework a lot of the presentation code.</p>
</li>
<li>
<p><strong>Makes it easier to maintain a common code base.</strong> When you use FBML, you will probably need to branch your code base so that you can maintain a Facebook version, a stand-alone version, and perhaps a version that fits into another network, such as Bebo or OpenSocial. However, if you use an IFrame approach, you will not need to replace more generic HTML with Facebook-specific FBML.</p>
<p>Having said that, if you are going to integrate into various social networking environments, you need to be realistic. Some platform-specific presentation code must be performed, regardless of whether you use FBML. Therefore, the IFrame approach is not necessarily a cure-all for portability.</p>
</li>
<li>
<p><strong>Avoids JavaScript limitations.</strong> The Facebook Platform does provide scripting support, but it is more restrictive than a native HTML environment. As a result, with IFrames, you are not bound to the same restrictions for using JavaScript as you would be using FBML.</p>
</li>
</ol>
<p>The decision you make will depend on your circumstances. If you can write suggest or advice, go ahead.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.merttol.com/articles/web/code/choosing-between-an-fbml-or-iframe.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Understanding RDFa</title>
		<link>http://www.merttol.com/articles/web/code/understanding-rdfa.html</link>
		<comments>http://www.merttol.com/articles/web/code/understanding-rdfa.html#comments</comments>
		<pubDate>Mon, 30 Nov 2009 17:45:47 +0000</pubDate>
		<dc:creator>Mert TOL</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[HTML and XHTML]]></category>
		<category><![CDATA[Microformat]]></category>
		<category><![CDATA[Semantic]]></category>
		<category><![CDATA[Web Usability]]></category>

		<guid isPermaLink="false">http://www.merttol.com/?p=1140</guid>
		<description><![CDATA[Since microformats typically don’t try to solve specific cases for niche fields, RDFa picks up where microformats leave off by adding an open-ended mechanism for extending the semantics of markup without limitations from the host markup language itself.]]></description>
			<content:encoded><![CDATA[<p><span class="drop-cap">S</span>ince microformats typically don’t try to solve specific cases for niche fields, RDFa picks up where microformats leave off by adding an open-ended mechanism for extending the semantics of markup without limitations from the host markup language itself. In other words, RDFa is a simple and, more important, language-agnostic way of giving documents the means to be self-describing. RDFa uses a set of attributes (hence the trailing “a”) that can be attached to any element whose values reference other elements in the same or other documents.</p>
<p>As you know, when you view a web page you’re asking your web browser to fetch a document. This document is just a text file that happens to be constructed in a special way. It’s constructed according to the syntax and grammar of a particular markup language so that all the content it contains is represented in a structured format.</p>
<p>It turns out that this structure has some remarkable similarities to human languages. Put simply, when we construct sentences in human languages we often use a grammatical structure that begins with a subject, followed by a verb, and that then ends with an object.</p>
<p>Markup languages also have rules of grammar. There are elements, each a building block or component of the larger whole. An element can have certain properties that further specify its details. These properties are often attributes, but they can also be the element’s own contents. Finally, an element has a certain position within the document relative to all the other elements, giving it a hierarchical context.</p>
<p>That markup languages contain rudimentary but powerful grammars in three major forms: which elements are being used, which attributes and attribute values those elements have, and the hierarchical context of elements in relation to one another. The ability to nest one element within another creates implicit relationships between different elements, but is structurally limiting. If elements are required to be nested to reference one another, neither the document itself nor the rest of the Web can be flexibly structured.</p>
<p>RDFa adds a fourth grammatical form by allowing one element, via an attribute and value pair, to reference any other element anywhere else on the Web by way of its unique web address or URI. Rather than referring to a document, now the reference actually refers to an object—a person, idea, place, event, book, or some other thing. The attribute used to do this is the <code>about</code> attribute. For instance, given a transcript of a speech we can now explicitly refer to and describe it without requiring that the two pieces of markup be structurally attached to one another.</p>
<pre>&lt;blockquote cite="http://example.com/myspeech" id="my-speech"&gt;
	&lt;p&gt;Once upon a time {...}&lt;/p&gt;
&lt;/blockquote&gt;</pre>
<p>By giving this speech an explicit <code>id</code> attribute and unique value, we then use this value in a different element’s <code>about</code> attribute:</p>
<pre>&lt;p&gt;
	The speech was written by
	&lt;a about="#my-speech" property="dc:creator"
		href="http://www.example.com/~McFerrin/"&gt;
		Bobby McFerrin
	&lt;/a&gt;
&lt;/p&gt;</pre>
<p>Here, we’ve described the speech as being created by Bobby McFerrin. RDFa gets its name from the fact that it borrows a concept from the W3C’s Resource Description Framework (RDF) called a triple, itself merely a way of describing two objects (two “things”) with a relationship to one another. In the prior example, the quoted speech is one object (the subject), Bobby McFerrin is the other (the predicate), and the fact that Bobby wrote the speech (that is, he is the creator) is the relationship. The only magic here is that the meaning of a “creator” has already been defined by a vocabulary we’re referring to as “dc” (short for Dublin Core).</p>
<p>In addition to the attributes already present in XHTML that RDFa makes use of such as rel and rev, RDFa adds the following attributes:</p>
<ol class="alpha">
<li>
<p><code>property:</code> Specifies a URI (or CURIE, simply a more compact URI) that references a particular term in a given vocabulary; the marked-up content is then known to be that “thing.”</p>
</li>
<li>
<p><code>about:</code> Optionally provides an explicit reference to a second object that the current element describes.</p>
</li>
<li>
<p><code>content:</code> Optionally used with the <code>property</code> attribute to provide an explicit, machine-readable interpretation of the content of an element. For instance, an element such as <code>&lt;span property="dc:date" content="2009-11-30"&gt;Nov 30, 2009&lt;/span&gt;</code> reads to humans as &#8220;Nov 30, 2009&#8243; but reads as 2009-11-30 to machines.</p>
</li>
<li>
<p><code>datatype:</code> Optional CURIE that specifies the data type of text specified for use with the <code>property</code> attribute (for example, string or integer, useful for ensuring data integrity for machine processing).</p>
</li>
<li>
<p><code>typeof:</code> Optional CURIE value that declares a new data item.</p>
</li>
<li>
<p><code>resource:</code> A URI or CURIE, which expresses the resource of a relationship.</p>
</li>
</ol>
<p>It’s this flexibility with the RDF triple and the extensible, highly specific capabilities that RDFa brings to markup languages that distinguishes it and makes it infinitely more scalable than the microformats initiative. Some might consider these two technologies in competition, but really they are not; both are simply differing approaches to solving the same challenge of having a more semantic and understandable markup framework on the Web. Some crossover exists, but both microformats and RDFa can coexist within the same markup.</p>
<h2>Related Resources</h2>
<p class="continue"><a rel="external" href="http://en.wikipedia.org/wiki/RDFa">Wikipedia &#8211; RDFa</a></p>
<p class="continue"><a rel="external" href="http://www.alistapart.com/articles/introduction-to-rdfa/">A List Apart &#8211; Introduction to RDFa</a></p>
<p class="continue"><a rel="external" href="http://www.alistapart.com/articles/introduction-to-rdfa-ii/">A List Apart &#8211; Introduction to RDFa II</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.merttol.com/articles/web/code/understanding-rdfa.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CSS3 and Its Adversaries</title>
		<link>http://www.merttol.com/articles/web/code/css3-and-its-adversaries.html</link>
		<comments>http://www.merttol.com/articles/web/code/css3-and-its-adversaries.html#comments</comments>
		<pubDate>Fri, 27 Nov 2009 02:02:38 +0000</pubDate>
		<dc:creator>Mert TOL</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML and XHTML]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.merttol.com/?p=1123</guid>
		<description><![CDATA[One of the amazing things about the development of web technologies is that they were relatively anarchic.]]></description>
			<content:encoded><![CDATA[<p class="notefirst">One of the amazing things about the development of web technologies is that they were relatively anarchic.</p>
<p>Unlike the development of traditional GUI systems, which were created behind the closed doors of academic institutions like Xerox’s PARC and later developed further by products such as Apple’s original Macintosh, the Web evolved in an open and, for lack of a better term, amateurish fashion. Although we can debate the benefits of one form of evolution over another, few argue that the Web isn’t a platform for incredible innovation, proving that either evolutionary method can push the development of such technologies in interesting and useful new directions.</p>
<p>As with all technologies, CSS is designed to solve a particular use case: separating the presentation of content from the structure of the content itself and reforming it to new presentations easily. However, CSS is not the only technology designed to solve this same use case. One notable competitor is XSL-FO, heavily used in the publishing industries for print layouts.</p>
<p>XSL-FO is a self-contained, unified, presentational markup language. This means that an XSL-FO document does not require external style sheets, scripts, or other apparatus to work as expected, and it is not considered semantically structured the way HTML or XHTML is. It is most often used to create print documents and is specifically tailored for paged media. A typical workflow involving XSL-FO would look something like this:</p>
<ol class="number">
<li>
<p>The XML document (such as DocBook, used in publishing contexts) is created.</p>
</li>
<li>
<p>The XML document is passed through an Extensible Style Sheet Transformation (XSLT) to convert the XML into XSL-FO.</p>
</li>
<li>
<p>The XSL-FO is passed through an “FO Processor”—software intended to convert the presentational document to another (potentially binary) format. The usual output is some press-ready format, such as PDF or PostScript.</p>
</li>
</ol>
<p>XSL-FO contrasts with CSS in that it is a markup language, and all of the presentational data is contained within element attributes. It is not semantic at all, nor is it modular. It is a transition format between XML and some other format, and isn’t intended to be worked with by itself without some sort of programmatic capabilities on either end of the process (such as XSLT and software to convert to PDF).</p>
<p>The question is at what point in the advancement of CSS does XSL-FO become obsolete? With improvements in the specification around web fonts and print media, all the components for a full-featured print styling mechanism are coming into place. All that remains is a parser to convert your markup into a press-ready format such as PDF or PostScript. Printing your markup directly from a CSS style sheet instead of doing all that XSL-FO transformation means one less step in the process, and it leverages the opportunity to use external style sheets and skills that you already know to write manually, if that is needed or desired.</p>
<p>Another open question among web technologists concerns the CSS selection model. In CSS3, the ways in which elements can be targeted by CSS rules has been extracted into its own module called <a rel="external" href="http://www.w3.org/TR/css3-selectors/">CSS3 Selectors</a>. As you know, CSS’s notion of selectors originated in the first version of the specification, first published in 1996. However, in 1999 the W3C standardized a similar technology intended to be used to address parts of an XML document that provided much more granular control over which parts of the document were selected. This technology is called the XML Path Language, or XPath.</p>
<p>Today, the earliest versions of XPath still give XPath authors greater specificity over which parts of an XML document they wish to address than even the latest CSS3 Selectors draft. Many developers wonder, then, if such a precise language exists already, why is the CSS3 Selectors draft not incorporating more of it?</p>
<p>Some believe that XPath’s syntax is too complicated. A common selection such as “all <code>&lt;p&gt;</code> elements” is extremely intuitive using CSS (the selector is simply a <code>p</code>) and in XPath it is not (to achieve the same effect, the XPath expression you need to use is <code>//p</code>).</p>
<p>On the other hand, with new CSS constructions such as <code>div#content &mdash; div:not(p:nth-of-type(3)a[href])</code>, CSS Selectors can become frustratingly complex as well. What is an appropriate balance between simplicity and power? This is a debate that rages on to this day.</p>
<p>Other parts of CSS are taking the opposite route; rather than developing their own syntax and capabilities, they are taking on the behavior and terminology of other technologies. At the time of this writing, the proposed CSS3 modules for CSS Animations and Transitions was accepted to the standards track by the W3C. These modules incorporate SVG-like capabilities. More to the point, they are so similar that they can be thought of as a CSS interface to SVG graphical capability. Of course, CSS can be applied to SVG markup, so clearly there is some opportunity there for web authors to leverage their CSS skills in SVG elements.</p>
<p>In this case, the ubiquity of CSS is helping to promote and standardize the capabilities developed by other technologies. Since there are so many more knowledgeable CSS developers than there are SVG developers, it makes sense to utilize your existing familiarity to push the envelope of what is technically possible.</p>
<p>However, this path is not without its concerns. Although some would argue that creating more than one way to do something is a good thing, others argue that creating too many different ways to accomplish the same task fragments a standard and undermines its usefulness. Since many modern browsers support SVG today, the question becomes why not promote its use as is?</p>
<p>A further question that comes up is related to the technicality of the implementation itself. SVG is, a “thing” that can be referenced and re-purposed as a form of content. It is ultimately a language that describes building blocks of visual things. When you put the pieces together, you can create ever more complex graphical objects. On the other hand, CSS requires the use of a different thing; by itself, a style sheet doesn’t do anything.</p>
<p>These examples are the product of nothing more magical than developers like you playing around with the building blocks that we have today; such academic experimentation is the best thing you can do to expand your skills. When you run into a problem, ask yourself if you can use an existing building block—a CSS property or particular browser feature—to solve it, or if you need a new building block altogether. If you do need to create something new, since you’ve now imagined what it might be, tell other people what you need or, if you can, <strong>build it yourself</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.merttol.com/articles/web/code/css3-and-its-adversaries.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>About Submit &amp; Reset Buttons</title>
		<link>http://www.merttol.com/articles/web/code/about-submit-reset-buttons.html</link>
		<comments>http://www.merttol.com/articles/web/code/about-submit-reset-buttons.html#comments</comments>
		<pubDate>Thu, 15 Oct 2009 16:59:43 +0000</pubDate>
		<dc:creator>Mert TOL</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Web Accessibility]]></category>
		<category><![CDATA[Web Usability]]></category>

		<guid isPermaLink="false">http://www.merttol.com/?p=957</guid>
		<description><![CDATA[Submit and Reset buttons should be easy to see, and should be close to their related form controls.]]></description>
			<content:encoded><![CDATA[<p><span class="drop-cap">W</span>e should never, ever, use a Reset button; it&#8217;s far too easy for a visitor to hit it accidentally, thereby clearing several minutes of data entry. And just how often does a visitor deliberately want to clear an entire form, anyway? Rarely, it would seem. Most of the time, the visitor wants to retype a field or two but almost never needs to retype an entire form. Besides, hitting the browser&#8217;s &#8220;refresh&#8221; button would serve the same function as a Reset button.</p>
<p>If you do feel the need to include a Reset button, use it with caution, and at least be sure to use JavaScript to capture the reset event in order to ask, &#8220;Are you sure…?&#8221;, thus double-checking the visitor&#8217;s intention before he or she does something irreversible.</p>
<p>Submit and Reset buttons should be easy to see, and should be close to their related form controls. In any circumstance where the user has to choose between two or more action buttons, like Submit and Reset, be sure to position the safer or more positive action on the left, and the riskier or more negative action on the right. Also make sure default focus lands on the safer of the two actions, in case the visitor hits Enter without paying attention to the offered choices.</p>
<p>Any time there could be irreversible consequences for a visitor&#8217;s action, be sure to confirm that the action is what was actually intended. For example, never delete an account, submit an order, or change critical data in the database without first asking, &#8220;Are you sure you want to &#8230;&#8221; (fill in the blank, of course, with a description of the critical action).</p>
<p>After a form has been submitted to the server, visitors are reassured if the server sends back a response page that re-displays the entered information. That way, they can double-check that the information they intended to provide was not only entered properly but also received correctly by the web site.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.merttol.com/articles/web/code/about-submit-reset-buttons.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Avoiding Multiple Submissions</title>
		<link>http://www.merttol.com/articles/web/avoiding-multiple-submissions.html</link>
		<comments>http://www.merttol.com/articles/web/avoiding-multiple-submissions.html#comments</comments>
		<pubDate>Thu, 15 Oct 2009 16:45:47 +0000</pubDate>
		<dc:creator>Mert TOL</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Web Accessibility]]></category>
		<category><![CDATA[Web Usability]]></category>

		<guid isPermaLink="false">http://www.merttol.com/?p=946</guid>
		<description><![CDATA[Whether using a browser-supplied or a custom Submit button, we don't want the form to be accidentally submitted multiple times.]]></description>
			<content:encoded><![CDATA[<p class="notefirst">Whether using a browser-supplied or a custom Submit button, we don&#8217;t want the form to be accidentally submitted multiple times.</p>
<p>We&#8217;ve all seen web pages that warn the visitor not to click a Submit button twice. Unfortunately, if the submission takes more than just a second or two, the visitor is left wondering if the click actually registered. At the same time, she&#8217;s afraid to click a second time—after all, she&#8217;s been warned of dire consequences if he clicks that second time. Just how long does the visitor wait in a case like this?</p>
<p><strong>There are two user-friendly ways to avoid causing our visitors this kind of angst:</strong></p>
<ol class="alpha">
<li>
<p>Immediately reassure visitors with feedback that the form is in the process of being submitted, often done with some type of small animation. This is a great way, under any circumstances, of reassuring visitors that something is indeed happening.</p>
</li>
<li>
<p>Use JavaScript to disable the Submit button after it&#8217;s clicked, thereby preventing a double submission.</p>
<p>Add the following to the <code>&lt;form&gt;</code> tag:</p>
<p><code>onsubmit="this.submitButtonName.disabled=true"</code></p>
<p>Be aware that you might have to trace a hierarchy of path names to get to the button, if it&#8217;s embedded within other elements like a table, and that the page would need to be reloaded completely to re-enable the Submit button. Getting this to work might be a bit trickier than it appears if you&#8217;re unfamiliar with JavaScript and the Document Object Model (DOM).</p>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.merttol.com/articles/web/avoiding-multiple-submissions.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

