/*
 * Copyright (c) 2011 Pixware SARL. All rights reserved.
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * Used to style a DITA document set. See the <documentSetFactory> element
 * in map_common.incl. 
 */

toc {
    display: block;
}

toc[title] {
    collapsible: yes;
}

toc[title]:before {
    display: inline-block;
    content: paragraph(content(collapser(), " ", attr(title)));
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 0.1ex;
    border-style: solid;
    border-width: 2px;
    border-bottom-color: gray;
    border-top-color: transparent;
    border-left-color: transparent;
    border-right-color: transparent;
}

tocEntry {
    display: block;
    collapsible: yes;
    margin-left: 4ex;
    margin-top: 0.25ex;
    margin-bottom: 0.25ex;
}

tocEntry:before {
    display: inline-block;
    content: paragraph(content(collapser(), " ", 
                               attr(titlePrefix), " ", attr(title)));
    margin-left: 4ex;
    margin-top: 0.25ex;
    margin-bottom: 0.25ex;
}

tocEntry:empty {
    content: paragraph(content(attr(titlePrefix), " ", attr(title)));
    collapsible: no;
}

tocEntry:empty:before {
    content: "";
}

tocEntry[role=part]:before,
tocEntry[role=chapter]:before,
tocEntry[role=appendices]:before,
tocEntry[role=appendix]:before,
tocEntry[role=part]:empty,
tocEntry[role=chapter]:empty,
tocEntry[role=appendices]:empty,
tocEntry[role=appendix]:empty {
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 0.5ex;
    margin-bottom: 0.5ex;
}

tocEntry[type=glossary]:before,
tocEntry[type=glossary]:empty {
    color: #6060B0;
}

tocEntry[type=concept]:before,
tocEntry[type=concept]:empty {
    color: rgb(139,0,0);
}

tocEntry[type=task]:before,
tocEntry[type=task]:empty {
    color: rgb(0,100,0);
}

tocEntry[type=reference]:before,
tocEntry[type=reference]:empty {
    color: rgb(85,26,139);
}

/*****************************************************************************
tocEntry[href]:before {
    content: paragraph(content(collapser(), " ", 
                               attr(titlePrefix), " ", attr(title), " ", 
                               text(attr(type), color, gray, 
                                    font-size, medium,
                                    font-weight, normal), " ", 
                               icon(right-link, gray), 
                               text(attr(href), font-family, monospace,
                                    color, gray, font-size, medium,
                                    font-weight, normal)));
}

tocEntry[href]:empty:before {
    content: "";
}

tocEntry[href]:empty {
    content: paragraph(content(attr(titlePrefix), " ", attr(title), " ", 
                               text(attr(type), color, gray, 
                                    font-size, medium,
                                    font-weight, normal), " ", 
                               icon(right-link, gray), 
                               text(attr(href), font-family, monospace,
                                    color, gray, font-size, medium,
                                    font-weight, normal)));
}
*****************************************************************************/
