/*
 * Copyright (c) 2003-2006 Pixware. 
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * A generic style sheet for XML data.
 */

* {
    display: block;
    collapsible: yes;
    not-collapsible-head: 1;
    border: 1 solid #D0D0D0;
    padding: 1;
    margin: 8 4;
}

@property-value element-header(title, background)
    division(content(paragraph(content(collapser(collapsed-icon, 
                                                 icon(pop-right), 
                                                 expanded-icon,
                                                 icon(pop-down)), " ",
                                       title, 
                                       replace-button(), " ",
                                       insert-before-button(), " ",
                                       insert-button(), " ",
                                       insert-after-button(), " ",
                                       convert-button(), " ",
                                       delete-button(), "  ",
                                       add-attribute-button(
                                           check-has-attributes, yes,
                                           color, navy)),
                                background-color, background,
                                padding-left, 4),
                     attributes(margin-top, 2,
                                margin-bottom, 2,
                                margin-left, 2,
                                margin-right, 2)));
*:before {
    display: inline;
    content: element-header(argument-list(element-name(), "  "), #D0D0D0);
}

/* 
 * ***Trick*** no replaced content if element content type is different 
 * from data (i.e. mixed, element only, etc).
 */

* {
    content: value-editor();
}

*::attribute {
    attribute-content-left: attribute-name();
    attribute-content-middle: value-editor(attribute, attribute());
    attribute-content-right: 
        remove-attribute-button(attribute, attribute(),
                                check-required, yes,
                                color, navy);
    show-attribute: when-added;
}
