/*
 * Copyright (c) 2006-2008 Pixware. 
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * Styles which are specific to DocBook 5.
 */

@namespace "http://docbook.org/ns/docbook";
@namespace db5 "http://docbook.org/ns/docbook";
@import url(../../docbook/css/docbook.css);
@import "ebnf.imp";

acknowledgements {
    display: block;
    /* content of acknowledgments has a margin */
}

info  {
    display: block; 
    margin: 1.33ex 0;
    border: thin solid #00FFFF;
    background-color: #CCFFFF;
    padding: 2px;
}

info > * {
    display: block;
    text-align: left; /* Reset paragraph styles */
    font: normal normal 1em sans-serif;
    color: black;
    margin-left: 18ex;
    margin-right: 0;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

info > *:first-child { /* nicer */
    margin-top: 0;
    margin-bottom: 0;
}

info > *:before {
    display: marker; 
    content: element-label();
    font: normal normal small sans-serif;
    color: #004080;
}

info > *:after {
    content: "";
}

info > title {
    font-size: 1.3em;
    font-weight: bold;
    color: #004080;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    margin-bottom: 1ex;
}

info > title:before {
    content: "";
}

cover {
    display: block;
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

person,
org {
    display: block; /* can contain address */
    margin-top: 1.33ex;
    margin-bottom: 1.33ex;
}

tocdiv {
    display: block;
    margin-left: 4ex;
}

tag {
    font-family: monospace;
}

tag:before,
tag:after {
    color: gray;
}

tag[class=attvalue]:before {
    content: '"';
}
tag[class=attvalue]:after {
    content: '"';
}

tag[class=starttag]:before,
tag[class=emptytag]:before {
    content: "<";
}
tag[class=endtag]:before {
    content: "</";
}
tag[class=endtag]:after,
tag[class=starttag]:after {
    content: ">";
}
tag[class=emptytag]:after {
    content: "/>";
}

tag[class=pi]:before,
tag[class=xmlpi]:before {
    content: "<?";
}
tag[class=pi]:after,
tag[class=xmlpi]:after {
    content: "?>";
}

tag[class=comment]:before {
    content: "<!--";
}
tag[class=comment]:after {
    content: "-->";
}

tag[class=paramentity]:before {
    content: "%";
}
tag[class=genentity]:before {
    content: "&";
}
tag[class=numcharref]:before {
    content: "&#";
}
tag[class=paramentity]:after,
tag[class=genentity]:after,
tag[class=numcharref]:after {
    content: ";";
}

modifier {
    white-space: pre;
}

example > info:first-child,
figure > info:first-child,
table > info:first-child,
appendix > info:first-child,
article > info:first-child,
book > info:first-child,
chapter > info:first-child,
part > info:first-child,
preface > info:first-child,
reference > info:first-child,
section > info:first-child,
set > info:first-child {
    margin-left: 20px;
}

example > info:first-child:before,
figure > info:first-child:before,
table > info:first-child:before,
appendix > info:first-child:before,
article > info:first-child:before,
book > info:first-child:before,
chapter > info:first-child:before,
part > info:first-child:before,
preface > info:first-child:before,
reference > info:first-child:before,
section > info:first-child:before,
set > info:first-child:before {
    content: collapser();
    display: marker;
}

/*
 * There are 3 kinds of imagedata:
 *
 * - classic: empty with a fileref attribute.
 * - svg: may contain one or more SVG elements.
 * - mathml: may contain one or more MathML elements.
 *
 * All kinds of imagedata may also contain an info element but this is not
 * supported by this CSS.
 *
 * com.xmlmind.xmleditext.docbook.Graphic has builtin support for all kinds
 * imagedata. However, rendering SVG images requires installing the Batik 
 * image toolkit plug-in and rendering ``MathML images'' requires installing 
 * the JEuclid image toolkit plug-in.
 */

@namespace mml "http://www.w3.org/1998/Math/MathML";

mml|math {
    display: inline;
}

inlineequation > mml|math,
informalequation > mml|math,
equation > mml|math {
    content: image-viewport(data-type, XML);
}
