<?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>From Accessibility to Zope &#187; CSS</title>
	<atom:link href="http://blog.mauveweb.co.uk/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mauveweb.co.uk</link>
	<description>experiments in contemporary web development</description>
	<lastBuildDate>Thu, 18 Aug 2011 23:26:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Tip: Don&#039;t use uppercase/lowercase in HTML</title>
		<link>http://blog.mauveweb.co.uk/2009/01/14/dont-use-uppercase-in-html/</link>
		<comments>http://blog.mauveweb.co.uk/2009/01/14/dont-use-uppercase-in-html/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 14:54:13 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/?p=231</guid>
		<description><![CDATA[It's sometimes tempting to use case for emphasis: uppercase and lowercase are well within the repertoire of useful graphic design tools. Graphic designers know that uppercase is slower to read than lower case, but in isolated phrases that's unimportant. But on the web there's a penalty to using just upper- or lowercase: it's not as [...]]]></description>
			<content:encoded><![CDATA[<p>It's sometimes tempting to use case for emphasis: uppercase and lowercase are well within the repertoire of useful graphic design tools. Graphic designers know that uppercase is slower to read than lower case, but in isolated phrases that's unimportant. But on the web there's a penalty to using just upper- or lowercase: it's not as accessible. Writing in normal sentence case conveys information. Specifically, the semantics of the sentence &#8211; particularly abbreviations &#8211; depend on the use of case, as this photo shows:</p>
<div id="attachment_232" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-232" title="BBC News 24's old text panel" src="http://blog.mauveweb.co.uk/wp-content/uploads/2009/01/image01-300x225.jpg" alt="NUT CONFERENCE" width="300" height="225" /><p class="wp-caption-text">NUT CONFERENCE</p></div>
<p><acronym title="Cascading Style Sheets">CSS</acronym> provides a way around this: the <code>text-transform</code> property. This allows you to write your content in full-sentence case, and display it in full uppercase or lowercase as desired for stylistic reasons. For example, if your design calls for &lt;h2&gt; tags to be in uppercase, use</p>
<p><code>h2 <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">text-transform</span>: <span style="color: #993333;">uppercase</span>;<br />
<span style="color: #66cc66;">&#125;</span></code></p>
<p>Of course, this allows you to simply remove the property if you change your site design; no content needs to be rewritten.</p>
<p>Some <a href="http://www.networkrailmediacentre.co.uk/rss/default.aspx?feedid={E05B7BCC-AA48-48E2-B4AB-2C2A8F98619B}">offenders</a> even publish an <acronym title="Really Simple Syndication">RSS</acronym> feed using uppercase titles. Never do this. People who want to syndicate your feed normally want it in sentence case, and there's no way to force that to happen if you aren't publishing the <acronym title="Really Simple Syndication">RSS</acronym> feed using proper sentence case.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2009/01/14/dont-use-uppercase-in-html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tip: Styling bullet lists</title>
		<link>http://blog.mauveweb.co.uk/2008/01/18/tip-styling-bullet-lists/</link>
		<comments>http://blog.mauveweb.co.uk/2008/01/18/tip-styling-bullet-lists/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 21:08:44 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/2008/01/18/tip-styling-bullet-lists/</guid>
		<description><![CDATA[Bullet lists are a wonderful way of formatting both because they convey structure and because they serve to visually break up otherwise impenetrable paragraphs of prose.
It's possible to use a custom image for these bullets, by way of the CSS list-style-image property. This is a great way to carry your site's theme through into the [...]]]></description>
			<content:encoded><![CDATA[<p>Bullet lists are a wonderful way of formatting both because they convey structure and because they serve to visually break up otherwise impenetrable paragraphs of prose.</p>
<p>It's possible to use a custom image for these bullets, by way of the <acronym title="Cascading Style Sheets">CSS</acronym> <code>list-style-image</code> property. This is a great way to carry your site's theme through into the content.</p>
<p>If you can't be bothered to draw custom images, you can at least make your bullets agree with the font using the <code>list-style-type</code>. With sans-serif fonts, <code>square</code> bullets usually look more professional. If you are using serif fonts &#8211; and this is a bad idea incidentally, because they aren't as legible on a screen &#8211; use <code>circle</code> or <code>disc</code> (ie. unfilled circular) bullets.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2008/01/18/tip-styling-bullet-lists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The death of * HTML</title>
		<link>http://blog.mauveweb.co.uk/2006/12/27/the-death-of-html/</link>
		<comments>http://blog.mauveweb.co.uk/2006/12/27/the-death-of-html/#comments</comments>
		<pubDate>Wed, 27 Dec 2006 11:17:15 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/2006/12/27/the-death-of-html/</guid>
		<description><![CDATA[As I've now started to look at how some of my sites work in IE7, I discover that the main thing that has gone wrong is that the hack where you prepend CSS selectors with * html is now disabled. Of course I could have found this out six months ago but frankly, learning the [...]]]></description>
			<content:encoded><![CDATA[<p>As I've now started to look at how some of my sites work in <acronym title="Windows Internet Explorer 7">IE7</acronym>, I discover that the main thing that has gone wrong is that the hack where you prepend <acronym title="Cascading Style Sheets">CSS</acronym> selectors with <code>* html</code> is now disabled. Of course I could have found this out six months ago but frankly, learning the particular quirks of an as-yet-unreleased and sickeningly broken user agent is not something I am going to invest time in.</p>
<p>Obviously, this means that for any site that <acronym title="Windows Internet Explorer 7">IE7</acronym> breaks, it is failing on the standards-compliant <acronym title="Cascading Style Sheets">CSS</acronym>. But equally, as I noted before, not as many sites break as was expected. So that's pretty good news.</p>
<p>But for the sites that do break, and future sites in general, the situation is a mess. It's now necessary to split <acronym title="Windows Internet Explorer 7">IE7</acronym> styles into different, conditionally included files, either by selecting on <acronym title="User Agent">UA</acronym> (which is unreliable) or use a <em>gut-wrenchingly sickening</em> <acronym title="Internet Explorer">IE</acronym> misfeature called "conditional comments". <acronym title="Internet Explorer 6">IE6</acronym> rules need to be moved too, as <acronym title="Windows Internet Explorer 7">IE7</acronym> will have significant common ground with <acronym title="Internet Explorer 6">IE6</acronym> and you don't want to have to maintain two copied of any rule that is shared.</p>
<p>Having rules split between different files makes it harder to work with, because in <acronym title="Cascading Style Sheets">CSS</acronym> you need to literally compare selectors to work out the precedence. <code>* html</code> is much easier to work with because you can place your <acronym title="Internet Explorer">IE</acronym> rule right next to your real browser rule, and easily cross-reference the differences. Or if you change the real-browser rule, you can also amend the <acronym title="Internet Explorer">IE</acronym> rule at the same time. More annoyingly, if you already have a tidy collection of <acronym title="Cascading Style Sheets">CSS</acronym> stylesheets importing one another with the <code><span style="color: #a1a100;">@import </span></code> statement, you have to either collect your <acronym title="Internet Explorer">IE</acronym> styles in one file, or duplicate the tree for <acronym title="Internet Explorer">IE</acronym>. Neither is very maintainable. The <code><span style="color: #a1a100;">@import </span></code> statement is not very useful anyway though, because <acronym title="Cascading Style Sheets">CSS</acronym>'s precedence rules don't allow <acronym title="Cascading Style Sheets">CSS</acronym> to be modularised in an elegant way.</p>
<p>In Microsoft's defence, they are looking for a painless route to standards compliance that in all honestly does not exist. But I apportion the blame entirely to them, for two reasons. First, it was they who let the situation regarding standards compliance get so out of hand first; in effect, they are five years too late in starting to take this course of action. Secondly, bundling <acronym title="Internet Explorer">IE</acronym> with Windows is one of the most devastatingly damaging things they have ever done. The cost to businesses worldwide could run into hundreds of millions, if not billions of dollars, and this money is not even paying Microsoft shareholders: it's being flushed down the toilet. Web designers to some extent profit from it at the expense of other businesses, but even so, we would rather not have to do it because we would then simply be able to achieve more. We would probably charge more or less the same, but all sites would be stunningly beautiful with rich interactivity.</p>
<p><acronym title="Cascading Style Sheets">CSS</acronym>, has its own problems, of course, but these would have been very hard to predict all that time ago when it was drawn up:</p>
<ul>
<li>Selector-based stylesheets cannot be refactored without reference to a schema for the source document.</li>
<li><acronym title="Cascading Style Sheets">CSS</acronym> cannot deal with varying capabilities across implementations.</li>
<li><acronym title="Cascading Style Sheets">CSS</acronym> cannot be modularised, because selectors can very easily collide and supercede each other, dependent on the way the selector is described rather than the structure of the module. For modularised <acronym title="HyperText Markup Language">HTML</acronym>/CSS 'components', you really need to prevent styles being overriden unless explicitly requested.</li>
<li><acronym title="Cascading Style Sheets">CSS</acronym> units cannot be specified as an arithmetic operation on unknowns, such as '(1em-3px)'. This means dimensions measured in ems (useful for text) are incompatible with lengths measured in pixels (useful for images).</li>
<li><acronym title="Cascading Style Sheets">CSS</acronym> has insufficient control of vertical positioning. The basic operations available are "the vertical order is the same as the document order", "x is at this vertical position", and with a bit of creativity with floating blocks, "x follows all of these", plus one modifier, "all my descendants lay out relative to me".</li>
<li><acronym title="Cascading Style Sheets">CSS</acronym> doesn't allow constants. This means that you have to repeat constants, say colour codes or border styles, and change them in more than one place.</li>
<li><acronym title="Cascading Style Sheets">CSS</acronym> has some bizarre quirks. For example, it doesn't include padding in the width and height dimensions, so if you increase the padding, you have to decrease the width correspondingly. <acronym title="Internet Explorer">IE</acronym> for years did the opposite, which is totally wrong but much more intuitive.</li>
<li><acronym title="Cascading Style Sheets">CSS</acronym> selectors are lacking tidy disjunctions and assertions, things that exist nicely in XPath. It's possible to work around these, but not necessarily succinctly.</li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2006/12/27/the-death-of-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Refactoring stylesheets</title>
		<link>http://blog.mauveweb.co.uk/2006/10/02/refactoring-stylesheets/</link>
		<comments>http://blog.mauveweb.co.uk/2006/10/02/refactoring-stylesheets/#comments</comments>
		<pubDate>Mon, 02 Oct 2006 11:52:56 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[XSL]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/2006/10/02/refactoring-stylesheets/</guid>
		<description><![CDATA[Incidentally, one of the things I need to do to the shop is refactor the styles, which are XSL and CSS.
There is no good way I know of refactoring selector-driven stylesheets. Procedural styling, such as that used by smarty or even vanilla PHP, is easy. Styling starts in one place and flows in a controlled [...]]]></description>
			<content:encoded><![CDATA[<p>Incidentally, one of the things I need to do to the shop is refactor the styles, which are <acronym title="eXtensible Stylesheet Language">XSL</acronym> and <acronym title="Cascading Style Sheets">CSS</acronym>.</p>
<p>There is no good way I know of refactoring selector-driven stylesheets. Procedural styling, such as that used by smarty or even vanilla <acronym title="PHP: Hypertext Preprocessor">PHP</acronym>, is easy. Styling starts in one place and flows in a controlled way through to the end. Selectors make life difficult because you don't know what is going to match where or what is overridden by a different selector elsewhere. It's very difficult to work out how it works, even with comments, because you don't know which comments are immediately relevant and besides, they refer to a document structure which is dynamically generated.</p>
<p>I've never managed to cleanly refactor <acronym title="Cascading Style Sheets">CSS</acronym> and I've not really tried with <acronym title="eXtensible Stylesheet Language">XSL</acronym>, because it looks difficult for all the same reasons. With <acronym title="eXtensible Stylesheet Language">XSL</acronym> there's an intermediate <acronym title="eXtensible Markup Language">XML</acronym> structure that can be refactored, but this is generated procedurally. But for the presentation layer &#8211; <acronym title="Cascading Style Sheets">CSS</acronym>, <acronym title="eXtensible Stylesheet Language">XSL</acronym> and to some extent Javascript &#8211; if anyone knows a better way of refactoring than throwing it all out and starting again, please let me know.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2006/10/02/refactoring-stylesheets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

