Skip to content
Snippets Groups Projects
style.js 3.11 KiB
Newer Older
Mathis Neumann's avatar
Mathis Neumann committed
/**
    you should set syntax highlighting to CSS
    this is a .js file, because we can then use static imports which ember-cli can properly build.
    Notice that this is only pseudo-css for cytoscape. See the cytoscape.js docs for more info.
*/
Mathis Neumann's avatar
Mathis Neumann committed
export default function(theme){
    return `
Mathis Neumann's avatar
Mathis Neumann committed
* {
    font-size: 15px;
Mathis Neumann's avatar
Mathis Neumann committed
}
Mathis Neumann's avatar
Mathis Neumann committed
node { /* all nodes */
    content: data(label);
Mathis Neumann's avatar
Mathis Neumann committed
    shape: roundrectangle;
    text-valign: center;
    text-halign: center;
Christoph Dornieden's avatar
Christoph Dornieden committed
    width: 100px;
    height: 60px;
    text-wrap: wrap;
    text-max-width: 100px;
Mathis Neumann's avatar
Mathis Neumann committed
$node > node { /* compounds. "Nodes" in meta model. $ selects the parent node that has a node instead of the node (as css would) */
    padding-top: 10px;
    padding-left: 10px;
    padding-bottom: 10px;
    padding-right: 10px;
Christoph Dornieden's avatar
Christoph Dornieden committed
    border-width: 2px;
    text-valign: top;
    text-halign: center;
[type="nodeGroup"] {
    events: no; /* disable click, drag etc as this is just a frame */
}

Mathis Neumann's avatar
Mathis Neumann committed
[type="node"] {
Mathis Neumann's avatar
Mathis Neumann committed
    background-color: ${theme.nodeColor};
    color: ${theme.nodeTextColor};
    border-color: ${theme.nodeBorderColor};
Christoph Dornieden's avatar
Christoph Dornieden committed
    font-weight: bold;
[type="service"] {
    background-color: ${theme.serviceColor};
    color: ${theme.nodeTextColor};
    border-color: ${theme.nodeBorderColor};
    border-width: 2px;
    font-weight: bold;
    z-index: 100;
Christoph Dornieden's avatar
Christoph Dornieden committed
}

[type="serviceInstance"] {
Mathis Neumann's avatar
Mathis Neumann committed
    background-color: ${theme.serviceColor};
    color: ${theme.serviceTextColor};
    border-color: ${theme.serviceBorderColor};
Christoph Dornieden's avatar
Christoph Dornieden committed
    border-style: solid;
    border-width: 1px;
Christoph Dornieden's avatar
Christoph Dornieden committed
    font-weight: bold;
    shadow-blur: 0;
    shadow-color: #000;
    shadow-offset-x: 2px;
    shadow-offset-y: 2px;
    shadow-opacity: 0.5;
Christoph Dornieden's avatar
Christoph Dornieden committed
}
Christoph Dornieden's avatar
Christoph Dornieden committed

Christoph Dornieden's avatar
Christoph Dornieden committed
[type="communicationInstance"] {
Mathis Neumann's avatar
Mathis Neumann committed
    color: ${theme.arrowColor};
Christoph Dornieden's avatar
Christoph Dornieden committed
    line-color: ${theme.arrowColor};
    target-arrow-color: ${theme.arrowColor};

    /*text-background-color: ${theme.arrowLineColor};
    text-background-opacity: 1;*/
    /*text-background-shape: roundrectangle;*/
    text-outline-color: ${theme.arrowColor};
    text-outline-width: 1px;
    font-size: 12pt;
    width: data(workload);
}

[type="communication"] {
    color: ${theme.arrowColor};
    line-color: ${theme.arrowColor};
Mathis Neumann's avatar
Mathis Neumann committed
    target-arrow-color: ${theme.arrowColor};
    /*text-background-color: ${theme.arrowLineColor};
    text-background-opacity: 1;*/
    /*text-background-shape: roundrectangle;*/
    text-outline-color: ${theme.arrowColor};
    text-outline-width: 1px;
Christoph Dornieden's avatar
Christoph Dornieden committed
    font-size: 12pt;
    width: data(workload);
Mathis Neumann's avatar
Mathis Neumann committed
}

Mathis Neumann's avatar
Mathis Neumann committed
[type="nodeGroup"] {
Mathis Neumann's avatar
Mathis Neumann committed
    color: ${theme.nodeGroupTextColor};
    background-color: ${theme.nodeGroupColor};
Mathis Neumann's avatar
Mathis Neumann committed
    border-style: dotted;
Mathis Neumann's avatar
Mathis Neumann committed
    border-color: ${theme.nodeGroupBorderColor};
Mathis Neumann's avatar
Mathis Neumann committed
    border-width: 2px;
Christoph Dornieden's avatar
Christoph Dornieden committed
    font-weight: bold;
Mathis Neumann's avatar
Mathis Neumann committed
    label: data(label);
Mathis Neumann's avatar
Mathis Neumann committed
    color: ${theme.arrowLabelColor};
    font-weight: bold;
Mathis Neumann's avatar
Mathis Neumann committed
    target-arrow-shape: triangle-backcurve;
    curve-style: bezier; /* supports arrows */
    background-color: yellow;
}
    background-color: red;
}

:selected {
    background-color: black;
    line-color: black;
    target-arrow-color: black;
Mathis Neumann's avatar
Mathis Neumann committed
    source-arrow-color: red;
}

:touch {
    border-width: 2px;
Christoph Dornieden's avatar
Christoph Dornieden committed
`; /* js string end */