Comments on dc‐mono, version 1.1

What is it? The intent.

dc‐mono, which comes from decoy monograph, mostly refers to the stylesheet I use on the site. It’s homegrown, a genuine brew so to speak, but I’m also using it as a testbed for all sorts of semi‐formalized ideas I have about Web design.

The stylesheet currently covers those modules of XHTML 1.1 I find acceptable, and applies the full force of CSS2, plus some properties of CSS3 needed to support math and ruby. The sheet is comprehensive, having separate screen, print and aural styles. It fixes all CSS2 properties there are, plus the properties defined in CSS3’s upcoming ruby module. CSS3’s namespace extensions are used, and the stylesheet will render identically regardless of whether the page data is served as text/html, text/xml or application/xhtml+xml, and will not break if foreign, namespaced content is added at the block or inline levels of the XHTML tree. There is some preliminary support for MathML 2.0’s presentational markup, though this is sort of in the works. My personal opinion is that such purely presentational markup should not be further styled via CSS, but apparently the W3C people violently disagree with this one.

So, in addition to being a concrete CSS stylesheet, dc‐mono reflects my personal views on what online content should be like. I’m a big fan of static, accessible, standardized content. This is seen in that I try to write standards compliant and valid code for the site, and try to maintain a strict organization of the data. So far this approach has been quite successful: keeping the site in order and extending it is now quite easy and painless.

XHTML modules used and/or supported

The site style supports the following XHTML modularization modules. Obviously we have to support the core modules, which are Structure, Text, Hypertext and List. This makes for some totally incomprehensible things, like support for <br/> and the multiple different heading levels (why do we still have this, when there is no semantic benefit, a host of heading level considerations arise and style is strong enough to make do with a single <title> sorta element?) of HTML. Ruby is a normative part of XHTML 1.1 core, so it’s included as well. Plus it’s a lot of fun. Bi‐directional text is there for completeness, I’m a big fan of i18n. Full Tables are the choice, since tables are indispensable and I think the Full tables module is a more successful hybrid of old HTML tables and full CALS than the Simple tables one. Images we need for illustrations. Not decoration, though… Client‐side image maps are now accessible enough to be included. Metainformation is one of the things I’m a big fan of, so it has to be supported. Obviously the same goes for stylesheets, although I’m not sure inlined stylesheets are such a good idea. The Stylesheet module might be dropped. Links, well, killing them would kill a lot of useful structure I’d rather have all Web pages incorporate. (Mozilla supports that now, by the way.) And they are needed to link to external CSS.

The following modules are supported, but are considered bad practice by the author. Presentation elements are supported because I do not agree with the XHTML people’s assessment that <hr/> is presentational only. I also have some doubts over <sub> and <sup>. And if we support some of the elements, we need to support all of them, so… Scripting, on the other hand, is needed so that we can use <noscript>. Scripts themselves are Evil.

The following set of modules is supported, but the support has not been tested yet or there are unresolved issues. No surprise, here, since the Frames module has no clear relationship to CSS’s rendering model.

The following modules are currently unsupported, or are considered bad behavior by the author even if they were to function just fine. In order, Applets imply functionality and inaccessibility, which is bad. Basic forms aren’t used since the full ones are. The same goes for Basic tables. Server‐side image maps make for latencies and overly complex image maps, plus the client side ones are by far the more accessible implementation. Objects are dynamic, and invite plugins and other incompatibilities, so they’re not used either. IFrame isn’t generally supported, and a mixture of XInclude, XLink and CSS can be used to achieve the precise same effect. Intrinsic events imply procedural data, something which I don’t like. Base should probably be deprecated in favor of XBase, plus it isn’t really as useful as one might think. For instance, it royally fucks up the browser save functionality. Name identification is a leftover from the days of sovereign Netscape rule, and a bad, bad idea overall. We have id attributes for that sort of thing, now. And legacy, well, it’s legacy. That is, mostly presentational deadweight, bad coding practice, deprecated, and utterly useless and inflexible now that we have CSS.

Stylesheet modularization

As it happens, an extra 20 KB isn’t quite the thing one cares to load each time one wishes to view a single, potentially short HTML page. In fact, since the site uses a rather minimal subset of the full XHTML functionality, and I expect that the style will eventually have to support more than my site would ever use, it makes ample sense to modularize the current content. That way it is possible to load only the parts of the stylesheet currently being used, and additions to the sheet content are a helluva lot easier too.

The sheet is factored along two axes:

Some of the (considerable number of) possible combinations are collapsed to keep the number of separate files manageable. In particular, not all namespace modules are kept separate. For instance, the XHTML extras and other small namespaces are combined into a single class. We also don’t have a module for each XHTML or namespace one, because that would simply be too much to handle.

The XML module axis consists of the following classes:

The media axis consists of the following:

The basis set and the appropriate generic settings for specific media groups are included by their instantiations (e.g. the print‐xhtml sheet includes the basis‐xhtml, visual‐xhtml and paged‐xhtml sheets). However, the media group modification sheets (currently for paged and visual) never include the basis‐* ones, because they will be included explicitly in the specific instantiations of the media group (like screen for visual).

In order to work the modules correctly, the defaults in the corresponding xstruct module must be included. I.e. whenever one uses the visual‐xhtml module, one must also include visual‐xstruct, and aural‐xstruct is needed for aural‐math.

Using the stylesheet in documents

Case 1: XHTML

The structure module is always needed since it contains default values. To include the structure basis module, include the following in document head:

<link rel="stylesheet" href="dc‐mono‐11‐screen‐xstruct.css" media="screen" title="decoy monograph 1.1"/>
<link rel="stylesheet" href="dc‐mono‐11‐aural‐xstruct.css" media="aural" title="decoy monograph 1.1"/>
<link rel="stylesheet" href="dc‐mono‐11‐print‐xstruct.css" media="print" title="decoy monograph 1.1"/>

To include the XHTML basis module, include the following in document head:

<link rel="stylesheet" href="dc‐mono‐11‐screen‐xhtml.css" media="screen" title="decoy monograph 1.1"/>
<link rel="stylesheet" href="dc‐mono‐11‐aural‐xhtml.css" media="aural" title="decoy monograph 1.1"/>
<link rel="stylesheet" href="dc‐mono‐11‐print‐xhtml.css" media="print" title="decoy monograph 1.1"/>

To include the math module, include the following in document head:

<link rel="stylesheet" href="dc‐mono‐11‐screen‐math.css" media="screen" title="decoy monograph 1.1"/>
<link rel="stylesheet" href="dc‐mono‐11‐aural‐math.css" media="aural" title="decoy monograph 1.1"/>
<link rel="stylesheet" href="dc‐mono‐11‐print‐math.css" media="print" title="decoy monograph 1.1"/>

To include the XHTML extra (plus miscellaneous small namespaces) module, include the following in document head:

<link rel="stylesheet" href="dc‐mono‐11‐screen‐xextra.css" media="screen" title="decoy monograph 1.1"/>
<link rel="stylesheet" href="dc‐mono‐11‐aural‐xextra.css" media="aural" title="decoy monograph 1.1"/>
<link rel="stylesheet" href="dc‐mono‐11‐print‐xextra.css" media="print" title="decoy monograph 1.1"/>

To include the XHTML forms module, include the following in document head:

<link rel="stylesheet" href="dc‐mono‐11‐screen‐xform.css" media="screen" title="decoy monograph 1.1"/>
<link rel="stylesheet" href="dc‐mono‐11‐aural‐xform.css" media="aural" title="decoy monograph 1.1"/>
<link rel="stylesheet" href="dc‐mono‐11‐print‐xform.css" media="print" title="decoy monograph 1.1"/>

Case 2: XML

The structure module is always needed since it contains default values. To include the structure basis module, include the following in the document prolog, that is, after the XML declaration but before the document element start tag:

<?xml‐stylesheet alternate="no" href="dc‐mono‐11‐screen‐xstruct.css" media="screen" title="decoy monograph 1.1"?>
<?xml‐stylesheet alternate="no" href="dc‐mono‐11‐aural‐xstruct.css" media="aural" title="decoy monograph 1.1"?>
<?xml‐stylesheet alternate="no" href="dc‐mono‐11‐print‐xstruct.css" media="print" title="decoy monograph 1.1"?>

To include the XHTML basis module, include the following in the document prolog:

<?xml‐stylesheet alternate="no" href="dc‐mono‐11‐screen‐xhtml.css" media="screen" title="decoy monograph 1.1"?>
<?xml‐stylesheet alternate="no" href="dc‐mono‐11‐aural‐xhtml.css" media="aural" title="decoy monograph 1.1"?>
<?xml‐stylesheet alternate="no" href="dc‐mono‐11‐print‐xhtml.css" media="print" title="decoy monograph 1.1"?>

To include the math module, include the following in the document prolog:

<?xml‐stylesheet alternate="no" href="dc‐mono‐11‐screen‐math.css" media="screen" title="decoy monograph 1.1"?>
<?xml‐stylesheet alternate="no" href="dc‐mono‐11‐aural‐math.css" media="aural" title="decoy monograph 1.1"?>
<?xml‐stylesheet alternate="no" href="dc‐mono‐11‐print‐math.css" media="print" title="decoy monograph 1.1"?>

To include the XHTML extra (plus miscellaneous small namespaces) module, include the following in the document prolog:

<?xml‐stylesheet alternate="no" href="dc‐mono‐11‐screen‐xextra.css" media="screen" title="decoy monograph 1.1"?>
<?xml‐stylesheet alternate="no" href="dc‐mono‐11‐aural‐xextra.css" media="aural" title="decoy monograph 1.1"?>
<?xml‐stylesheet alternate="no" href="dc‐mono‐11‐print‐xextra.css" media="print" title="decoy monograph 1.1"?>

To include the XHTML forms module, include the following in the document prolog:

<?xml‐stylesheet alternate="no" href="dc‐mono‐11‐screen‐xform.css" media="screen" title="decoy monograph 1.1"?>
<?xml‐stylesheet alternate="no" href="dc‐mono‐11‐aural‐xform.css" media="aural" title="decoy monograph 1.1"?>
<?xml‐stylesheet alternate="no" href="dc‐mono‐11‐print‐xform.css" media="print" title="decoy monograph 1.1"?>