Skip to content

Commit 5612b32

Browse files
committed
include some v12 base styles
1 parent bc2bafa commit 5612b32

3 files changed

Lines changed: 173 additions & 12 deletions

File tree

src/extensions/react-flow/_config.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
$reactflow-background-color: $card-background-color !default;
12
$reactflow-node-basesize: $button-height !default;
23
$reactflow-node-largesize: mini-units(6) !default;
34
$reactflow-node-border-color: $eccgui-color-workspace-text !default;

src/extensions/react-flow/_react-flow.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,3 @@
55
@import "handles/handles";
66
@import "minimap/minimap";
77
@import "react-flow_v12";
8-
9-
.react-flow__viewport {
10-
transform-origin: 0 0;
11-
}
12-
13-
.react-flow__background {
14-
border: solid 1px $eccgui-color-separation-divider;
15-
}

src/extensions/react-flow/_react-flow_v12.scss

Lines changed: 172 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,187 @@
1-
// needed styles from "@xyflow/react/dist/style.css" to ensure proper functionality
1+
/**
2+
* We need some styles from "@xyflow/react/dist/style.css" to ensure proper functionality.
3+
* Some of them are directly included to the component styles.
4+
* Other stuff is here.
5+
* Colors are removed or altered.
6+
*/
7+
8+
.react-flow {
9+
direction: ltr;
10+
}
11+
12+
.react-flow__pane {
13+
z-index: 1;
14+
}
15+
16+
.react-flow__pane.draggable {
17+
cursor: grab;
18+
}
19+
20+
.react-flow__pane.dragging {
21+
cursor: grabbing;
22+
}
23+
24+
.react-flow__pane.selection {
25+
cursor: pointer;
26+
}
27+
28+
.react-flow__viewport {
29+
z-index: 2;
30+
pointer-events: none;
31+
transform-origin: 0 0;
32+
}
33+
34+
.react-flow__renderer {
35+
z-index: 4;
36+
}
37+
38+
.react-flow__selection {
39+
z-index: 6;
40+
}
41+
42+
.react-flow__controls {
43+
display: flex;
44+
flex-direction: column;
45+
}
46+
47+
.react-flow__controls.horizontal {
48+
flex-direction: row;
49+
}
50+
51+
.react-flow__controls-button {
52+
display: flex;
53+
justify-content: center;
54+
cursor: pointer;
55+
user-select: none;
56+
}
57+
58+
.react-flow__controls-button svg {
59+
width: 100%;
60+
max-width: 12px;
61+
max-height: 12px;
62+
fill: currentcolor;
63+
}
64+
65+
.react-flow .react-flow__edges {
66+
position: absolute;
67+
}
68+
69+
.react-flow .react-flow__edges svg {
70+
position: absolute;
71+
overflow: visible;
72+
pointer-events: none;
73+
}
74+
75+
.react-flow__edge {
76+
pointer-events: visiblestroke;
77+
}
78+
79+
.react-flow__edge.inactive {
80+
pointer-events: none;
81+
}
82+
83+
.react-flow__edge-textwrapper {
84+
pointer-events: all;
85+
}
86+
87+
.react-flow__edge .react-flow__edge-text {
88+
pointer-events: none;
89+
user-select: none;
90+
}
91+
92+
.react-flow__connection {
93+
pointer-events: none;
94+
}
295

396
svg.react-flow__connectionline {
497
position: absolute;
598
z-index: 1001;
699
overflow: visible;
7100
}
8101

9-
.react-flow .react-flow__edges svg {
102+
.react-flow__nodes {
103+
pointer-events: none;
104+
transform-origin: 0 0;
105+
}
106+
107+
.react-flow__node {
10108
position: absolute;
11-
overflow: visible;
109+
box-sizing: border-box;
110+
pointer-events: all;
111+
cursor: default;
112+
user-select: none;
113+
transform-origin: 0 0;
114+
}
115+
116+
.react-flow__node.selectable {
117+
cursor: pointer;
118+
}
119+
120+
.react-flow__node.draggable {
121+
pointer-events: all;
122+
cursor: grab;
123+
}
124+
125+
.react-flow__node.draggable.dragging {
126+
cursor: grabbing;
127+
}
128+
129+
.react-flow__nodesselection {
130+
z-index: 3;
131+
pointer-events: none;
132+
transform-origin: left top;
133+
}
134+
135+
.react-flow__nodesselection-rect {
136+
position: absolute;
137+
pointer-events: all;
138+
cursor: grab;
139+
}
140+
141+
.react-flow__handle.connectingfrom {
142+
pointer-events: all;
143+
}
144+
145+
.react-flow__handle.connectionindicator {
146+
pointer-events: all;
147+
}
148+
149+
.react-flow__edgeupdater {
150+
pointer-events: all;
151+
cursor: move;
152+
}
153+
154+
.react-flow__minimap-svg {
155+
display: block;
156+
}
157+
158+
.react-flow__node.selectable:focus,
159+
.react-flow__node.selectable:focus-visible {
160+
outline: none;
161+
}
162+
163+
.react-flow__nodesselection-rect:focus,
164+
.react-flow__nodesselection-rect:focus-visible,
165+
.react-flow__selection:focus,
166+
.react-flow__selection:focus-visible {
167+
outline: none;
168+
}
169+
170+
.react-flow__controls-button:disabled {
171+
pointer-events: none;
172+
}
173+
174+
// -- adjustments
175+
176+
.react-flow__background {
177+
z-index: -1;
12178
pointer-events: none;
179+
background-color: $reactflow-background-color;
180+
border: solid 1px $eccgui-color-separation-divider;
13181
}
14182

15183
.react-flow__background-pattern {
16-
opacity: 0.39;
184+
opacity: $eccgui-opacity-ghostly;
17185
}
18186

19187
.react-flow__background-pattern.dots {

0 commit comments

Comments
 (0)