<?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>Webdogs 2.0 &#187; project grace</title>
	<atom:link href="http://www.webdogs.org/tag/project-grace/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webdogs.org</link>
	<description>Webdogs 2.0 ~ data, design and derring-do since, uh, whenever</description>
	<lastBuildDate>Mon, 26 Jul 2010 21:04:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Project Grace 04: &#8220;East Bay&#8221; 21 Screenshot Salute!</title>
		<link>http://www.webdogs.org/2008/02/10/project-grace-04-east-bay-21-screenshot-salute/</link>
		<comments>http://www.webdogs.org/2008/02/10/project-grace-04-east-bay-21-screenshot-salute/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 05:23:05 +0000</pubDate>
		<dc:creator>Brian Lawlor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[pika]]></category>
		<category><![CDATA[project grace]]></category>

		<guid isPermaLink="false">http://www.webdogs.org/2008/02/10/project-grace-04-east-bay-21-screenshot-salute/</guid>
		<description><![CDATA[
In late December, after posting an earlier version of this post, I realized I was going about this aspect of Project Grace all wrong, so I pulled that original version, a post about &#8220;Basic CSS page layout.&#8221; There was nothing wrong with the post, but I realized I was drifting toward just repeating myself, essentially [...]]]></description>
			<content:encoded><![CDATA[<p><img style="float: right; margin: 0 0 0 20px;" src="http://www.webdogs.org/dog_files/easy_bay_cut.png" alt="" /></p>
<p>In late December, after posting an earlier version of this post, I realized I was going about this aspect of <a href="http://www.webdogs.org/?page_id=11">Project Grace</a> all wrong, so I pulled that original version, a post about &#8220;Basic CSS page layout.&#8221; There was nothing wrong with the post, but I realized I was drifting toward just repeating myself, essentially a &#8220;remastered&#8221; series of articles I wrote, quite demonstrably with less knowledge about Pika than I have now, when building <a href="http://pikasoftware.com/docs/index.php/Project_Claire:_Redesigning_Pika">Project Claire</a>.</p>
<p>But there were some deeper problems and challenges for me. As I moved ahead with the challenge of doing another CSS makeover of Pika, I was forced to realize (again) that there are really, really severe limits to what one can do with the CSS &#8220;presentational&#8221; characteristics of Pika because it still labors under a near-decade of seriously dated legacy markup. (In fairness, when we looked at competing CMS options a few years back, all the other developers suffered from this same shortcoming.) While <a href="http://pikasoftware.com/">Pika Software</a> did make a serious effort in version 3.06 to clean out embedded and inline styles, with something like a 40-50% uptick in external CSS coding (a good thing), a <em>huge</em> amount of inline styles remain (a bad thing). Pika still relies predominantly on &#8220;tables&#8221; to control layout and positioning of page elements, which is a good thing for backward browser compatibility and therefore brings a level of presentational predictability in production software. I totally get that. But otherwise it totally sucks.</p>
<p>This is a two-fisted combo that seriously prevents doing much of anything creative with Pika presentational characteristics. Why? Well, inline styles always trump the external style sheet. That&#8217;s how CSS works, so your stuck with whatever styles Pika Software embeds inline. And reliance on tables <em>severely</em> constricts the positioning of page elements. Basically, you&#8217;re stuck with the Pika default page layouts unless you are prepared to go in and rebuild your templates to conform to more current <a href="">web standards</a>, something we did with Project Claire, as best as we could at the time. </p>
<p>The other factor that triggered the change in how to approach Project Grace was a meeting Mark Sawyer and I had  with some folks from <a href="http://www.ebclc.org/">East Bay Community Law Center</a>, who soon will adopt their first CMS ever, namely, Pika 3.06. And I think it is fair to say they&#8217;re feeling overwhelmed. (Whew, <em>way</em> understandable to anyone who&#8217;s ever been through the process.)</p>
<p>It was during that meeting I got the idea to take the current version of Pika and do simply what I talk about above, i.e., quite literally rebuilding all the Pika templates and subtemplates, regrettably but of necessity still relying on the deeply embedded tables-based layout structures, while removing all the inline styles that remain in the markup. And then modifying minimally the PHP files essential to dynamically generating other specific Pika page markup, principally markup generated dynamically by <code>pika_cms.php</code> and <code>pikaMisc.php</code>. And then creating a totally custom CSS style sheet, all of which works with a default Pika installation. No changes in how Pika works out of the box. No changes in Pika default workflow. Just better, more flexible markup in the templates, some essential tweaks to a few PHP files to get other markup to display correctly, and a fresh coat of paint for the whole shebang via a custom CSS style sheet. And something one could simply upload to the <code>/pika-custom</code> and <code>/css</code> subfolders in one or two fell swoops.</p>
<p>The goal would be to conjure up a simple, clean, low-contrast, uncluttered design refresh. That&#8217;s the theory, anyway. So, with Aaron&#8217;s recent announcement that Pika 3.07 will be released in another week or so (and Pika 4.0 put off to later this year, at the earliest), the Project Grace approach has changed: Once version 3.07 hits the street, <a href="http://lsnc.net/">LSNC</a> will set up <em>three</em> Pika 3.07 test beds: first, a virgin reference install; second, an &#8220;East Bay&#8221; install to build a new set of default templates with a custom CSS style sheet, as described above; and third, a long-form install where we can work on a more radical rebuild to incorporate all latest, way cool Pika Software modifications into all the existing LSNC customizations, something that may take us the better part of six months or so to complete.</p>
<p>What I will be doing here at Webdogs 2.0 is reporting on progress of the second and third installs. Rather than do long-form tutorials, as I have been doing, what I will do is post the rebuilt templates and the custom &#8220;East Bay&#8221; CSS to <a href="http://pikasoftware.com/docs/">PikaDocs</a> in the <a href="http://pikasoftware.com/docs/index.php/California_Customizations">California Customizations</a> section. These two installs will most definitely be works in progress. The files posted to Pikadocs will inevitably be added, edited, supplemented, and/or deleted depending on what&#8217;s happening as the work goes forward. Most likely, I will post select additions to the Project Grace series here to detail distinctive elements of the templates or CSS designs.</p>
<p>Want an early taste? Take a look at the <a href="http://pikasoftware.com/docs/index.php/East_Bay_Community_Law_Center_screenshots">initial set of 21 screenshots</a> of the &#8220;East Bay&#8221; design now posted to PikaDocs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdogs.org/2008/02/10/project-grace-04-east-bay-21-screenshot-salute/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Elaborating some on global reset and global styles</title>
		<link>http://www.webdogs.org/2007/11/27/elaborating-some-on-global-reset-and-global-styles/</link>
		<comments>http://www.webdogs.org/2007/11/27/elaborating-some-on-global-reset-and-global-styles/#comments</comments>
		<pubDate>Tue, 27 Nov 2007 20:32:42 +0000</pubDate>
		<dc:creator>Brian Lawlor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[global reset]]></category>
		<category><![CDATA[pika]]></category>
		<category><![CDATA[project grace]]></category>

		<guid isPermaLink="false">http://www.webdogs.org/2007/11/27/elaborating-some-on-global-reset-and-global-styles/</guid>
		<description><![CDATA[A few days back I illustrated use of a blunt-force global reset as part of the most recent step in Project Grace. I relied on this purposefully blunt approach to make the perhaps overly dramatic point that resetting all margins and padding for all structural elements significantly simplifies the process of building out one&#8217;s CSS [...]]]></description>
			<content:encoded><![CDATA[<p>A few days back I illustrated use of a <a href="http://www.webdogs.org/2007/11/25/project-grace-03-rebuilding-the-css-from-scratch/">blunt-force global reset</a> as part of the most recent step in <a href="http://www.webdogs.org/pika-palooza/">Project Grace</a>. I relied on this purposefully blunt approach to make the perhaps overly dramatic point that resetting all margins and padding for all structural elements significantly simplifies the process of building out one&#8217;s CSS for use in most all browsers. And the blunt approach is especially effective for something like a closed, secure Pika installation because it is highly unlikely your actual <em>users</em> (not necessarily your resident IT geekmeisters) rely on any browser other than Firefox or Internet Explorer. We certainly don&#8217;t here at <a href="http://lsnc.net/">LSNC</a>.</p>
<p>But I am mindful of the broader implications of using a global reset, i.e., there are any number of other web browsers or viewers that may be used with your public web content, which is why I referred to Eric Meyer&#8217;s <em>au courant</em> article, <a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">Reset Reloaded</a>. My current practice for building out CSS on newer public web projects here is to use a modestly trimmed-down version of Eric Meyer&#8217;s code, consistent with those structural elements we actually would use in an <a href="http://en.wikipedia.org/wiki/XHTML#XHTML_1.0">XHTML 1.0 Strict</a> build, combined with certain &#8220;Webdogs&#8221; global style defaults.</p>
<p>So, for the record, here are the more nuanced CSS global reset and initial global styles we currently use on all new website builds, with notations:</p>
<pre>

<span>/*
global resets based on Eric Meyer's "Reset Reload" at
<a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/</a>
 */</span>

html, body, div, span,
h1, h2, h3, h4, h5, h6, p, pre,
a, code, em, font, img, strong, sub, sup,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-weight: inherit;
    font-style: inherit;
    font-size: 100%;
    font-family: inherit;
    vertical-align: baseline;
    }
<span>/* remember to define focus styles! */</span>
:focus {
    outline: 0;
    }
body {
    line-height: 1;
    color: black;
    background: white;
    }
ol, ul {
    list-style: none;
    }
<span>/* tables still need 'cellspacing="0"' in the markup */</span>
table {
    border-collapse: collapse;
    border-spacing: 0;
    }
caption, th, td {
    text-align: left;
    font-weight: normal;
    }

<span>/*
global resets per Webdogs defaults;
font-size set per Clagnut's "How to size text using ems" at
<a href="http://clagnut.com/blog/348">http://clagnut.com/blog/348</a>
*/</span>

body {
    color: #333333; <span>/* reduced contrast black */</span>
    font-family: verdana, arial, sans-serif;
    font-size: 62.50%; <span>/* resets 1.0em = 10px */</span>
    line-height: 1.50; <span>/* reset leading for readability */</span>
    }
a:link,
a:visited {
    background: transparent;
    color: #333333; <span>/* reduced contrast black */</span>
    font-weight: bold;
    text-decoration: none;
    }
a:hover,
a:active {
    color: #0000FF; <span>/* blue */</span>
    }

<span>/* prevents inherited shrinkage in Firefox per Clagnut at:
<a href="http://clagnut.com/blog/348/">http://clagnut.com/blog/348/</a> */</span>
li li,
li p,
td p {
    font-size: 1.0em
    }

<span>/* for Firefox where page content &lt; viewport height,
per Zoe Gillenwater's "Create Pages that Fill the Browser with CSS" at
<a href="http://www.communitymx.com/content/article.cfm?cid=BAD95">http://www.communitymx.com/content/article.cfm?cid=BAD95</a>
 */</span>
html,
body {
    margin-bottom: 1px;
    min-height: 100%;
    }
</pre>
<p>Since this is the type of CSS code one is likely to use over and over, consider putting it into a separate style sheet and then use an <a href="http://css-discuss.incutio.com/?page=ImportHack">import rule</a> to pull it into your overall styles for the site. Just a thought.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdogs.org/2007/11/27/elaborating-some-on-global-reset-and-global-styles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project Grace 03: Rebuilding the CSS from scratch</title>
		<link>http://www.webdogs.org/2007/11/25/project-grace-03-rebuilding-the-css-from-scratch/</link>
		<comments>http://www.webdogs.org/2007/11/25/project-grace-03-rebuilding-the-css-from-scratch/#comments</comments>
		<pubDate>Sun, 25 Nov 2007 21:41:47 +0000</pubDate>
		<dc:creator>Brian Lawlor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[global reset]]></category>
		<category><![CDATA[pika]]></category>
		<category><![CDATA[project grace]]></category>

		<guid isPermaLink="false">http://www.webdogs.org/2007/11/25/project-grace-03-rebuilding-the-css-from-scratch/</guid>
		<description><![CDATA[Where we&#8217;re going with the Pika CSS
The first two articles in the Project Grace: Pika Reloaded series were an introduction to several common basic web design development tools, most notably the Firebug extension for Firefox. In practice Firebug has largely supplanted most of the other web design diagnostic tools I had long relied upon, such [...]]]></description>
			<content:encoded><![CDATA[<h3>Where we&#8217;re going with the Pika CSS</h3>
<p>The first two articles in the <a href="http://www.webdogs.org/pika-palooza/">Project Grace: Pika Reloaded</a> series were an introduction to several common basic web design development tools, most notably the <a href="https://addons.mozilla.org/en-US/firefox/addon/1843">Firebug</a> extension for Firefox. In practice Firebug has largely supplanted most of the other web design diagnostic tools I had long relied upon, such as the <a href="https://addons.mozilla.org/en-US/firefox/addon/60">Web Developer Toolbar</a> and the <a href="https://addons.mozilla.org/en-US/firefox/addon/655">View Source Chart</a> extension.</p>
<p>For example, in the past I often used the View Source Chart extension to generate a wonderfully useful visual display of the underlying HTML page structure. For a Pika-specific example of how View Source Chart works, take a look this <a href="http://www.webdogs.org/dog_files/chart_pika_home_page.html">visual chart of the Pika Home Page</a>. This type of visual chart is especially helpful in building CSS code since it provides a handy-dandy visual list of all the page elements, their specific <a href="http://www.htmldog.com/reference/htmltags/commonattributes/">id and class attributes</a>, and an easily understood structural hierarchy revealing where the page elements are relative to each other, i.e., which are structural parents, children or siblings. But the ease and convenience of Firebug has changed my web design work habits a lot. Now what I more often do is simply activate the inspection window in Firebug, click on the particular page element I am curious about and go from there, as needed, to diagnose what ails me about the web page design. Which is how I will proceed for the most part as I rebuild the Pika CSS from scratch for Project Grace.</p>
<p>In this article I will briefly explain three things:</p>
<ul>
<li>where the default CSS code in Pika 3.06 is located and how it is organized;</li>
<li>how to edit the <a href="http://www.htmldog.com/reference/htmltags/head/">head tag</a> in the <code>default.html</code> template to remove the default <a href="http://www.htmldog.com/reference/htmltags/link/">link tags</a> that call the Pika default style sheets and substitute new ones, so you can start from scratch and rebuild the CSS from the ground up with your own custom style sheets that will work in both Firefox and Internet Explorer; and</li>
<li>add the first bit of CSS to your style sheets by doing a a &#8220;global reset&#8221; so that your new CSS code will behave more predictably in both Firefox and Internet Explorer.</li>
</ul>
<h3>How the default Pika CSS code is organized</h3>
<p>In a standard web page, one or more external style sheets in the form of CSS files are linked to the web page by using a <a href="http://www.w3schools.com/css/css_howto.asp">link tag embedded in the head element</a> of the page. Pika 3.06 accomplishes this by linking the default styles via the <code>screen.css.php</code> file located in the <code>/pika/css</code> subdirectory. View the source code for any Pika page and you&#8217;ll see it linked in the <a href="http://www.htmldog.com/reference/htmltags/head/">head</a> tag at the top:</p>
<p><code>&lt;link href="/pika/css/screen.css.php" rel="stylesheet" type="text/css" /&gt;</code></p>
<p>The <code>screen.css.php</code> file contains 500+ lines of CSS code. If motivated, you can <a href="http://www.webdogs.org/dog_files/project_grace/pika_306_default_styles.txt">view the default Pika CSS code</a>. If you do take a quick look-see at the default Pika CSS, you&#8217;ll notice that is ordered this way:</p>
<ul>
<li>Basic structural markup elements (e.g., <code>a ... body ... div</code>, etc.) listed in alphabetical order, followed by &#8230;</li>
<li><a href="http://www.htmldog.com/guides/cssintermediate/classid/">id selectors</a> and their descendants (e.g., <code>#auth_label ... #auth_label a ... #bottom_searchbox</code>, etc.) listed in alphabetical order, followed by &#8230;</li>
<li><a href="http://www.htmldog.com/guides/cssintermediate/classid/">class selectors</a> and their descendants (e.g., <code>.de select ... .de input</code>, etc.) clustered into the following 10 categories:
<ol>
<li>&#8220;size&#8221; of data entry fields</li>
<li>&#8220;specialized&#8221; data entry fields</li>
<li>&#8220;size&#8221; of sidebar fields</li>
<li>&#8220;eligibility&#8221; fields</li>
<li>&#8220;settings&#8221; fields</li>
<li>&#8220;case list&#8221; fields</li>
<li>&#8220;alternating table rows&#8221;</li>
<li>&#8220;masked form&#8221; fields</li>
<li>&#8220;calendar rows&#8221;</li>
<li>&#8220;case notes&#8221; text format</li>
</ol>
</li>
</ul>
<p>As we step through the rebuilding of the CSS code, I am going to suggest a different approach for organizing the CSS code. But for now, let&#8217;s do some damage.</p>
<h3>Creating a custom set of Pika style sheets</h3>
<p>The first step I suggest for creating your own custom styles for Pika from scratch is to summarily drop-kick the  <code>screen.css.php</code> file out of the mix entirely. To do so, edit the <a href="http://www.htmldog.com/reference/htmltags/head/">head</a> tag at the top of the <code>default.html</code> template to substitute a new set of <a href="http://www.htmldog.com/reference/htmltags/link/">link</a> tags that pull in your new styles from three core sources: a &#8220;custom&#8221; CSS file for your new default Pika styles; one or more <a href="http://msdn2.microsoft.com/en-us/library/ms537512(VS.85).aspx">IE conditional comments</a> so you can create CSS code that targets only Internet Explorer (for this exercise, I will include one global IE conditional comment; <a href="http://www.quirksmode.org/css/condcom.html">you could add others</a> as suit your needs); and a separate &#8220;print&#8221; styles sheet that controls how Pika pages print out from within your web browser.</p>
<p>For this stage of Project Grace, here&#8217;s what the new <code>head</code> tag looks like with all the new <code>link</code> tags added:</p>
<pre>
&lt;head&gt;
&lt;meta http-equiv="content-type" content="text/html; charset=UTF-8" /&gt;
&lt;title&gt;Pika: %%[page_title]%%&lt;/title&gt;
&lt;link rel="icon" href="%%[base_url]%%/favicon.ico" /&gt;
&lt;link rel="shortcut icon" href="%%[base_url]%%/favicon.ico" /&gt;
&lt;link rel="stylesheet" type="text/css" href="%%[base_url]%%/css/hub.css" /&gt;
&lt;!--[if IE]&gt;
&lt;link rel="stylesheet" type="text/css" href="%%[base_url]%%/css/ie.css" /&gt;
&lt;![endif]--&gt;
&lt;link rel="stylesheet" type="text/css" media="print" href="%%[base_url]%%/css/print.css" /&gt;
&lt;/head&gt;
</pre>
<p>Since these newly linked style sheets have not even been created yet, with these changes made to the <code>default.html</code> template what you will see is a Pika Home page (and other pages) stark naked, i.e., a <a href="http://www.webdogs.org/dog_files/project_grace/pika_home_naked.html">completely unstyled page</a>.</p>
<p>Create the three new (albeit empty) style sheet files &#8212; <code>custom.css</code>, <code>ie.css</code> and <code>print.css</code> and put them into your <code>/pika/css/</code> subdirectory.</p>
<p>Now you&#8217;re ready to dive in with your first Pika custom CSS by performing a hold-on-to-your-butt CSS &#8220;global reset.&#8221; What&#8217;s that you, say? Read on!</p>
<h3 id="reset">Creating a &#8220;global reset&#8221; for the Pika CSS</h3>
<p>Before re-applying any real &#8220;styles&#8221; to this newly naked Pika page, I want to do a CSS &#8220;global reset.&#8221; That phrase originates with <a href="http://leftjustified.net/">Andrew Krespanis&#8217;</a> 2004 article <a href="http://leftjustified.net/journal/2004/10/19/global-ws-reset/">Global White Space Reset</a>, the basic theory of which has been famously regranulated by <a href="http://meyerweb.com/">Eric Meyer</a>, the godfather of all things CSS, in his more recent article <a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">Reset Reloaded</a> (May 1, 2007). You can review those articles to go deep on the theory.</p>
<p>In an earlier version of this article I suggested doing a blunt-force &#8220;reset&#8221; by using the asterisk <a href="http://meyerweb.com/eric/articles/webrev/200006a.html">universal selector</a> to reset all margins and padding for all HTML elements to zero. That works, and it is a very common web design approach, but upon further reflection I have decided to rewrite this subsection of the article to promote using a more nuanced global reset, based on Eric Meyer&#8217;s model and one that with minor changes I actually use in practice. </p>
<p>The global reset proposed here is essentially the same used here (with some variations) at <strong>Webdogs 2.0</strong>, as are the added set of initial global styles to control the default appearance of the <a href="http://www.htmldog.com/reference/htmltags/body/">body</a>, <a href="http://www.htmldog.com/reference/htmltags/a/">anchor</a> and <a href="http://www.htmldog.com/reference/htmltags/li/">list item</a> tags. I also am adding a initial global style for <a href="http://www.htmldog.com/reference/htmltags/img/">image</a> tags to get rid of the border that appears by default in some browsers (including Firefox).</p>
<p>Here&#8217;s the whole, initial chunk of CSS code being added to the <code>custom.css.</code> file, with annotations highlighted in yellow:</p>
<div class="pika_css">
<pre>

<span>/*
global resets based on Eric Meyer's "Reset Reload" at
<a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/</a>
 */</span>

html, body, div, span,
h1, h2, h3, h4, h5, h6, p, pre,
a, code, em, font, strong, sub, sup,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-weight: inherit;
    font-style: inherit;
    font-size: 100%;
    font-family: inherit;
    vertical-align: baseline;
    }
<span>/* remember to define focus styles! */</span>
:focus {
    outline: 0;
    }
body {
    line-height: 1;
    color: black;
    background: white;
    }
ol, ul {
    list-style: none;
    }
<span>/* tables still need 'cellspacing="0"' in the markup */</span>
table {
    border-collapse: collapse;
    border-spacing: 0;
    }
caption, th, td {
    text-align: left;
    font-weight: normal;
    }

<span>/*
global resets per Webdogs defaults;
font-size set per Clagnut's "How to size text using ems" at
<a href="http://clagnut.com/blog/348">http://clagnut.com/blog/348</a>
*/</span>

body {
    color: #333333; <span>/* reduced contrast black */</span>
    font-family: verdana, arial, sans-serif;
    font-size: 62.50%; <span>/* resets 1.0em = 10px */</span>
    line-height: 1.50; <span>/* reset leading for readability */</span>
    }
a:link,
a:visited {
    background: transparent;
    color: #333333; <span>/* reduced contrast black */</span>
    font-weight: bold;
    text-decoration: none;
    }
a:hover,
a:active {
    color: #0000FF; <span>/* blue */</span>
    }

<span>/* prevents inherited shrinkage in Firefox per Clagnut at:
<a href="http://clagnut.com/blog/348/">http://clagnut.com/blog/348/</a> */</span>
li li,
li p,
td p {
    font-size: 1.0em
    }

<span>/* use PRN on DIVs for clearing floated elements,
per Position Is Everthing at
<a href="http://www.positioniseverything.net/easyclearing.html">http://www.positioniseverything.net/easyclearing.html</a> */</span>
.clear-fix:after {
    content: ".";
    clear: both;
    display: block;
    height: 0;
    visibility: hidden;
    }

<span>/* for Firefox where page content &lt; viewport height,
per Zoe Gillenwater's "Create Pages that Fill the Browser with CSS" at
<a href="http://www.communitymx.com/content/article.cfm?cid=BAD95">http://www.communitymx.com/content/article.cfm?cid=BAD95</a>
 */</span>
html,
body {
    margin-bottom: 1px;
    min-height: 100%;
    }
</pre>
</div>
<p>With this CSS code added, the Pika Home Page still looks pretty naked but now has <a href="http://www.webdogs.org/dog_files/project_grace/pika_not_much.html">a few visually distinct characteristics</a> wrought by the new CSS, although the basic positioning or layout of the page elements remains the same. Let&#8217;s break it down.</p>
<h3>Explaining the first chunk of the Project Grace CSS code</h3>
<p>The global reset has already been explained, above. Here&#8217;s a brief explanation of how the other new CSS code affects the Project Grace styles at this stage, starting with the initial presentational characteristics for the <code>body</code> element:</p>
<pre>
body {
    background: #FFFFFF;
    color: #333333;
    font-family: verdana, arial, sans-serif;
    font-size: 62.50%;
    line-height: 1.50;
    }
</pre>
<p>The <a href="http://www.htmldog.com/reference/htmltags/body/">body</a> element is reset this way so that the <a href="http://www.htmldog.com/reference/cssproperties/background/">background</a> is white (#FFFFFF), the <a href="http://www.htmldog.com/reference/cssproperties/color/">color</a> of text is set to a lower contrast black (#333333) to enhance readability, and the basic <a href="http://www.htmldog.com/reference/cssproperties/font-family/">font-family</a> style is declared (verdana, etc.). The <a href="http://www.htmldog.com/reference/cssproperties/font-size/">font-size</a> is set to 62.5% to make it easier down the road to set alternate font sizes for other page elements that <a href="http://www.webdesignfromscratch.com/css-inheritance-cascade.cfm">inherit</a> this value from the <code>body</code> element. (For those who want a preview of the explanation for resetting the <code>font-size</code> this way, take a look at Richard Rutter&#8217;s highly influential article <a href="http://www.clagnut.com/blog/348/">How to size text using ems</a>. And for even more on this topic, you may want to read Richard Rutter&#8217;s more recent article published at <a href="http://www.alistapart.com/">A List Apart</a> in which he updates his take on  <a href="http://www.alistapart.com/articles/howtosizetextincss">other approaches</a> to assure cross-browser consistency in how text size displays. Here, I&#8217;m going to go with what I know until I can digest his latest musings on this subject.)</p>
<p>The <a href="http://www.htmldog.com/reference/cssproperties/line-height/">line-height</a> value is set to 1.50 to make the text, again, more readable. (Typographers refer to this as leading or line spacing). If you&#8217;re wondering what&#8217;s up with the &#8220;unitless&#8221; value for line-height, I refer you to Eric Meyer for <a href="http://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/">the explanation</a>. Me, I just do what Eric Meyer tells me to do. You would be wise to do so also.</p>
<p>Here is how the <a href="http://www.htmldog.com/reference/htmltags/a/">anchor</a> tags are styled at this early step in Project Grace:</p>
<pre>
a:link,
a:visited {
    background: transparent;
    color: #333333;
    font-weight: bold;
    text-decoration: none;
    }
a:hover,
a:active {
    color: #0000FF;
    }
</pre>
<p>The <code>anchor</code> or &#8220;link&#8221; tags are set exactly as they are here at <strong>Webdogs 2.0</strong>. The declared values for the <a href="http://www.htmldog.com/reference/cssproperties/">CSS properties</a> override any browser defaults for displaying linked text by establishing their default color as the same used in the <code>body</code> tag, but in bold so that they stand out against a transparent background (assuring that the background of any other page element shows through), without any <a href="http://www.htmldog.com/reference/cssproperties/text-decoration/">text-decoration</a> to get rid of the &#8220;underline&#8221; displayed by default for anchor tags in all browsers, and a &#8220;hover&#8221; state that changes the linked text to blue (#0000FF).</p>
<p>Why do it this way? In my judgement it is a mixture of both design and readability issues, the thought being that removing <code>text-decoration</code> makes actual reading of page text with links easier. We have been doing this for years at both <a href="http://lsnc.net/">LSNC.net</a> and, of course, here at <strong>Webdogs 2.0</strong> without any complaints or apparent confusion by users. None. Experience tells us it works and is actually more user friendly. (Needless to say, <a href="http://www.useit.com/alertbox/20040510.html">others would beg to differ</a>.)</p>
<p>Because <a href="http://www.htmldog.com/reference/htmltags/li/">list item</a> tags are the semantically correct way to build not only actual lists of things on web pages but also itemized horizontal and vertical elements, such as horizontal navigation and sidebar menus, the default for <a href="http://www.htmldog.com/reference/htmltags/ol/">ordered</a> and <a href="http://www.htmldog.com/reference/htmltags/ul/">unordered</a> list items is reset to <em>not</em> display any <a href="http://www.htmldog.com/reference/cssproperties/list-style/">list-style</a>, such as a bullet or disc: </p>
<pre>
ul, ol {
    list-style: none;
    }
</pre>
<p>To get rid of the blue <a href="http://www.htmldog.com/reference/cssproperties/border/">border</a> that appears by default around image tags in some browsers, you do so by globally nukin&#8217; it with a <code>none</code> value:</p>
<pre>
img {
    border: none;
    }
</pre>
<p>Finally, one common problem associated with different browsers is how they deal (or do not deal) with inheritance of <code>font-size</code> from some parent elements to some embedded child elements. This is a problem of <a href="http://clagnut.com/blog/348/">inherited shrinkage</a> triggered by the cascade effect of CSS that occurs inconsistently among browsers. Anyone who has had to tweak <code>font-size</code> to address inconsistencies in the text size of a sublist of item children embedded within a parent list knows of which I speak. <em>Aaaaargh!</em> To deal with that problem not only with list items but also paragraphs that are the children of parent <a href="http://www.htmldog.com/reference/htmltags/li/">list items</a> and <a href="http://www.htmldog.com/reference/htmltags/td/">table data cells</a>, the following CSS code is used:</p>
<pre>
 <span>/* prevents inherited shrinkage */</span>

li li,
li p,
td p {
    font-size: 1.0em
    }
</pre>
<p><em>Alrighty, now!</em> True, the Pika Home Page <a href="http://www.webdogs.org/dog_files/project_grace/pika_not_much.html">doesn&#8217;t look like much</a> at this early stage of CSS tweakery. But a solid &#8220;reset&#8221; foundation is in place as we stage for more visible changes to come. Reason enough to return for Project Grace 04, wouldn&#8217;t you say?</p>
<h3><strong>The Whole Enchilada: </strong><a href="http://www.webdogs.org/pika-palooza/">Project Grace: Pika Reloaded</a></h3>
]]></content:encoded>
			<wfw:commentRss>http://www.webdogs.org/2007/11/25/project-grace-03-rebuilding-the-css-from-scratch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project Grace 02: Basic HTML and CSS deconstruction</title>
		<link>http://www.webdogs.org/2007/11/18/project-grace-02-basic-deconstruction/</link>
		<comments>http://www.webdogs.org/2007/11/18/project-grace-02-basic-deconstruction/#comments</comments>
		<pubDate>Sun, 18 Nov 2007 21:39:14 +0000</pubDate>
		<dc:creator>Brian Lawlor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[pika]]></category>
		<category><![CDATA[project grace]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.webdogs.org/2007/11/18/project-grace-02-basic-pika-css-deconstruction/</guid>
		<description><![CDATA[Consider this article &#8220;basic orientation.&#8221; The focus here is to detail how to get a handle on the basic structural design of a Pika page and where the cascading style sheet (CSS) code resides within the current version 3.06 of Pika. I will rely on some of the web developer tools described in Project Grace [...]]]></description>
			<content:encoded><![CDATA[<p>Consider this article &#8220;basic orientation.&#8221; The focus here is to detail how to get a handle on the basic structural design of a Pika page and where the <a href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets">cascading style sheet</a> (CSS) code resides within the current version 3.06 of Pika. I will rely on some of the web developer tools described in <a href="http://www.webdogs.org/2007/11/06/project-grace-01-get-your-firebug-on/">Project Grace 01: Get your Firebug on</a> to demonstrate how to do that.</p>
<p>The first sacrificial lamb in support of Project Grace is, predictably, the Pika Home Page. Out of the box here is what that page looks like:</p>
<p><img src="http://www.webdogs.org/dog_files/home_page_default.png" alt="" /></p>
<h3>Understanding the underlying structure of the Home Page</h3>
<p>Let&#8217;s do some basic deconstruction. Using the <a href="https://addons.mozilla.org/en-US/firefox/addon/60">Web Developer Toolbar</a>, select <strong>CSS > Disable Styles > All Styles</strong>. Now the Pika Home Page displays stripped of all its custom CSS presentational characteristics. What you see is how your browser by default displays the page&#8217;s <a href="http://www.htmldog.com/guides/htmlbeginner/">HTML</a> structural markup in the same order as the markup appears in the &#8220;flow&#8221; of the underlying web page:</p>
<p><img src="http://www.webdogs.org/dog_files/home_page_naked.png" alt="" /></p>
<p>Looking at this page &#8220;naked,&#8221; even without looking at the actual markup behind the page display, those familiar with basic web page design will notice that the underlying structure of the page relies on <a href="http://www.htmldog.com/reference/htmltags/table/">tables</a>, rather than CSS, to control the basic layout of the page. The three apparent columns in the middle (&#8220;Frequent Tasks,&#8221; &#8220;Message Board&#8221; and &#8220;Learn to Use Pika&#8221;) are dead give-aways. Again using the Web Developer Toolbar, to confirm this observation select <strong>Outline > Outline Tables > Tables</strong>, revealing that the page uses a table at the top for the &#8220;header&#8221; area, below which is a second table for the &#8220;middle-content&#8221; area:</p>
<p><img src="http://www.webdogs.org/dog_files/home_page_tables.png" alt="" /></p>
<p>To see the table cells that control the three columns in that middle-content area, select <strong>Outline > Outline Tables > Table Cells</strong>:</p>
<p><img src="http://www.webdogs.org/dog_files/home_page_cells.png" alt="" /></p>
<p>Since this stage of Project Grace is an attempt at a benign CSS makeover of the default Pika 3.06 presentational design, I will refrain from my usual rant about the misuse of tables to control page layout this way. At the very least it is <a href="http://sidesh0w.com/projects/wdw2004/">not optimal</a>. It&#8217;s OK and it works and, admittedly, it assures backward compatibility with now generations-old web browsers. But with the advent of increasingly CSS-standards compliant browsers, including IE7 (much improved) and Firefox 2.0 (way better), such design approaches are increasingly harder to defend. But I digress.</p>
<p>The final structural piece is the page &#8220;footer&#8221; at the bottom. To see what that&#8217;s all about, let me show you three ways to Sunday using three different tools to figure out that bit of markup.</p>
<p>First, make sure you have refreshed the Pika Home Page to get rid of the any earlier selections you made using the Web Developer Toolbar and you can see the default Pika page design again. Good to go? Now select <strong>CSS > View Style Information</strong>. Then scroll down to the bottom of the page where the &#8220;footer&#8221; is located and hover &#8212; but don&#8217;t click &#8212; your mouse (which changes into a cross-hair) over that area so that it is highlighted with a thin red border:</p>
<p><img src="http://www.webdogs.org/dog_files/home_page_footer_crosshair.png" alt="" /></p>
<p>If you look up at the Web Developer Toolbar, it has opened a new information box immediately below the toolbar itself, revealing the underlying structural hierarchy for the highlighted page element, including the name of any <a href="http://www.htmldog.com/reference/htmltags/commonattributes/">id or class attributes</a>:</p>
<p><img src="http://www.webdogs.org/dog_files/home_page_webdev_styleinfo01.png" alt="" /></p>
<p>(I will explain below what else happens when you click on the page element using this feature.)</p>
<p>Second, try using the <a href="http://westciv.com/xray/xray_more.html">XRAY bookmarklet</a>. Click on it and then click on the footer area at the bottom of the page. (You may need to experiment with where you click to get results for the entire footer element, rather than other elements embedded within it.) The XRAY box displays basic information about that page element: It&#8217;s a <a href="http://www.htmldog.com/reference/htmltags/div/">div</a> with an <a href="http://www.htmldog.com/reference/htmltags/commonattributes/">id attribute</a> named &#8220;footer&#8221; and the inheritance hierarchy is <strong>html > body > div</strong>, all essential and useful information for working with CSS:</p>
<p><img src="http://www.webdogs.org/dog_files/home_page_xray.png" alt="" /></p>
<p>Third, let&#8217;s give <a href="https://addons.mozilla.org/en-US/firefox/addon/1843">Firebug</a> a shot at this. Activate Firebug and in the Inspection window pane select &#8220;HTML&#8221; and then &#8220;Inspect.&#8221; Hover your mouse over the footer area to assure you have selected the whole footer area (you will see the blue border change so you can see which area is active within the Firebug inspection window), and then click the area to select it:</p>
<p><img src="http://www.webdogs.org/dog_files/home_page_firebug.png" alt="" /></p>
<p>In the left pane you will see the &#8220;footer&#8221; div highlighted, as well as the structural hierarchy of that page element revealed, i.e., <strong>html > body > div</strong>.</p>
<h3>Locating the CSS code</h3>
<p>Here are a few ways to figure out where the CSS code is for any Pika page:</p>
<p><img class="left" src="http://www.webdogs.org/dog_files/home_page_webdev_styleinfo02.png" alt="" />Be sure to close out Firebug and refresh your browser window. You should be back to the default Pika Home Page design. Using the Web Developer Toolbar, select <strong>CSS > View CSS</strong>. This triggers a new page listing all <a href="http://www.communitymx.com/content/article.cfm?cid=FAF76">embedded CSS</a> styles followed by the file location and contents of all external CSS styles affecting the presentational characteristics of the page. (As far as I can tell, this feature in the Web Developer Toolbar does not reveal inline CSS styles.)</p>
<p>When you invoke this feature, you&#8217;ll see that all the basic CSS code is located in the Pika CSS subdirectory at <strong>/pika/css/screen.css.php</strong>. Conveniently, the CSS file location is linked so you can open up the CSS code into a separate web page for review. For locating the CSS code specific to a particular page element, select <strong>CSS > View Style Information</strong> and then click on a page element. For example, if you click on the footer element discussed above, you will see the CSS code illustrated to the left.</p>
<p><img class="right" src="http://www.webdogs.org/dog_files/home_page_firebug_css_link.png" alt="" />Another way to go is to use Firebug to locate the CSS file location and the CSS code that relates to any selected page element. I am not going to repeat so much how that works, <a href="http://www.webdogs.org/2007/11/06/project-grace-01-get-your-firebug-on/">detailed here</a> in the prior article. Suffice it to say that if you invoke Firebug and from the inspection window select HTML and Inspect, and then click anywhere on the page, you will see in the right pane the corresponding CSS code and where the file is located containing the code, illustrated here to the right and highlighted in yellow. The CSS file location is clickable, so if you want to get the whole CSS enchilada, not just the code for a particular element, go ahead and click it  and Firebug opens up the whole CSS file in the Firebug window. Nice.</p>
<p>The effort here has been to suggest several different ways to deconstruct Pika pages to give you the basic information you need to restyle its pages elements. On balance, I prefer using Firebug for both the HTML and CSS excavation processes described above. But that&#8217;s me. There is more than one route to the mountain top and you now know where several of those paths are to your innner HTML and CSS geek.</p>
<p>You&#8217;re oriented. You&#8217;ve got a handle on the basic structural markup of a Pika page. You know where the CSS code is located. You know how to zone in on the CSS code for any particular page element using various web developer tools to extract that information. Time now to do some Pika CSS style rebuilding, the whole point of this first stage of Project Grace. Onward to <a href="http://www.webdogs.org/2007/11/25/project-grace-03-rebuilding-the-css-from-scratch/">Project Grace 03: Rebuilding the CSS from scratch</a>!</p>
<h3><strong>The Whole Enchilada: </strong><a href="http://www.webdogs.org/pika-palooza/">Project Grace: Pika Reloaded</a></h3>
]]></content:encoded>
			<wfw:commentRss>http://www.webdogs.org/2007/11/18/project-grace-02-basic-deconstruction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
