Add a backend attribute, body-id, to AsciiDoc. This will set a CSS
signature for an xhtml11/html5 document.  This will allow the html to
be easily restyled or adjusted by a user based on this unique
identifier.
See: http://archivist.incutio.com/viewlist/css-discuss/13291

Here are some usage examples:

Command line use:

    -a body-id=www_corp

Within a document:

    :body-id: www_corp

HTML content:
  * Before (also default): <body class="article">
  * After:  <body class="article" id="www_corp">

CSS content (-a stylesheet=mystyle.css):
  body#www_corp {
    background-color: #ff0;
  }

The patches follow:

diff -u ../html5.conf html5.conf
--- ../html5.conf       2011-05-23 17:53:17.000000000 -0500
+++ html5.conf  2011-05-23 18:04:05.000000000 -0500
@@ -611,7 +611,7 @@
 {docinfo1,docinfo2#}{include:{docdir}/docinfo.html}
 {docinfo,docinfo2#}{include:{docdir}/{docname}-docinfo.html}
 </head>
-<body class="{doctype}"{max-width? style="max-width:{max-width}"}>
+<body class="{doctype}"{max-width? style="max-width:{max-width}"}
{body-id? id="{body-id}"}>
 # Article, book header.
 ifndef::doctype-manpage[]
 <div id="header">


diff -u ../xhtml11.conf xhtml11.conf
--- ../xhtml11.conf     2011-05-23 17:53:17.000000000 -0500
+++ xhtml11.conf        2011-05-23 18:03:34.000000000 -0500
@@ -606,7 +606,7 @@
 {docinfo1,docinfo2#}{include:{docdir}/docinfo.html}
 {docinfo,docinfo2#}{include:{docdir}/{docname}-docinfo.html}
 </head>
-<body class="{doctype}"{max-width? style="max-width:{max-width}"}>
+<body class="{doctype}"{max-width? style="max-width:{max-width}"}
{body-id? id="{body-id}"}>
 # Article, book header.
 ifndef::doctype-manpage[]
 <div id="header">


diff -u ../asciidoc.txt asciidoc.txt
--- ../asciidoc.txt     2011-05-23 17:53:17.000000000 -0500
+++ asciidoc.txt        2011-05-23 17:59:43.000000000 -0500
@@ -5686,6 +5686,10 @@
 |data-uri |xhtml11, html5 |
 Embed images using the <<X66,data: uri scheme>>.

+|body-id |html5, xhtml11 |
+Set a CSS signature for the document (sets the 'body' element CSS
+'id' property).
+
 |disable-javascript |xhtml11, html5 |
 If the `disable-javascript` attribute is defined the `asciidoc.js`
 JavaScript is not embedded or linked to the output document.  By

Thank you.
Peg Russell

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to