Files
xyflow/src/style.css

198 lines
2.9 KiB
CSS

.react-flow {
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
}
.react-flow__renderer {
width: 100%;
height: 100%;
position: absolute;
}
.react-flow__zoompane {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
.react-flow__selectionpane {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 2;
}
.react-flow__selection {
position: absolute;
top: 0;
left: 0;
background: rgba(0, 89, 220, 0.08);
border: 1px dotted rgba(0, 89, 220, 0.8);
}
.react-flow__edges {
position: absolute;
top: 0;
left: 0;
pointer-events: none;
z-index: 2;
}
.react-flow__edge {
pointer-events: all;
&.selected {
.react-flow__edge-path {
stroke: #555;
}
}
&.animated path {
stroke-dasharray: 5;
animation: dashdraw 0.5s linear infinite;
}
}
@keyframes dashdraw {
from {
stroke-dashoffset: 10;
}
}
.react-flow__connection {
pointer-events: none;
}
.react-flow__connection-path {
fill: none;
stroke: #ddd;
stroke-width: 2;
}
.react-flow__edge-path {
fill: none;
stroke: #bbb;
stroke-width: 2;
}
.react-flow__edge-text {
font-size: 12px;
pointer-events: none;
}
.react-flow__edge-textbg {
fill: white;
}
.react-flow__nodes {
width: 100%;
height: 100%;
position: absolute;
z-index: 3;
pointer-events: none;
transform-origin: 0 0;
}
.react-flow__node {
position: absolute;
color: #222;
font-family: sans-serif;
font-size: 12px;
text-align: center;
user-select: none;
pointer-events: all;
transform-origin: 0 0;
cursor: grab;
background: #eee;
&.selected,
&.selected:hover {
box-shadow: 0 0 0 2px #555;
}
&:hover {
box-shadow: 0 1px 5px 2px rgba(0, 0, 0, 0.08);
}
.react-flow__handle {
cursor: crosshair;
}
}
.react-flow__node-default {
padding: 10px;
border-radius: 5px;
width: 150px;
background: #ff6060;
}
.react-flow__node-input {
padding: 10px;
border-radius: 5px;
width: 150px;
background: #9999ff;
}
.react-flow__node-output {
padding: 10px;
border-radius: 5px;
width: 150px;
background: #55dd99;
}
.react-flow__handle {
position: absolute;
width: 10px;
height: 8px;
background: rgba(255, 255, 255, 0.4);
&.bottom {
top: auto;
left: 50%;
bottom: 0;
transform: translate(-50%, 0);
}
&.top {
left: 50%;
top: 0;
transform: translate(-50%, 0);
}
&.left {
top: 50%;
left: 0;
transform: translate(0, -50%);
}
&.right {
right: 0;
top: 50%;
transform: translate(0, -50%);
}
}
.react-flow__nodesselection {
z-index: 3;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
transform-origin: left top;
pointer-events: none;
&-rect {
position: absolute;
background: rgba(0, 89, 220, 0.08);
border: 1px dotted rgba(0, 89, 220, 0.8);
pointer-events: all;
}
}