diagram-js.css 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  1. /**
  2. * outline styles
  3. */
  4. .djs-outline {
  5. fill: none;
  6. visibility: hidden;
  7. }
  8. .djs-element.hover .djs-outline,
  9. .djs-element.selected .djs-outline {
  10. visibility: visible;
  11. shape-rendering: crispEdges;
  12. stroke-dasharray: 3,3;
  13. }
  14. .djs-element.selected .djs-outline {
  15. stroke: #8888FF;
  16. stroke-width: 1px;
  17. }
  18. .djs-element.hover .djs-outline {
  19. stroke: #FF8888;
  20. stroke-width: 1px;
  21. }
  22. .djs-shape.connect-ok .djs-visual > :nth-child(1) {
  23. fill: #DCFECC /* light-green */ !important;
  24. }
  25. .djs-shape.connect-not-ok .djs-visual > :nth-child(1),
  26. .djs-shape.drop-not-ok .djs-visual > :nth-child(1) {
  27. fill: #f9dee5 /* light-red */ !important;
  28. }
  29. .djs-shape.new-parent .djs-visual > :nth-child(1) {
  30. fill: #F7F9FF !important;
  31. }
  32. svg.drop-not-ok {
  33. background: #f9dee5 /* light-red */ !important;
  34. }
  35. svg.new-parent {
  36. background: #F7F9FF /* light-blue */ !important;
  37. }
  38. .djs-connection.connect-ok .djs-visual > :nth-child(1),
  39. .djs-connection.drop-ok .djs-visual > :nth-child(1) {
  40. stroke: #90DD5F /* light-green */ !important;
  41. }
  42. .djs-connection.connect-not-ok .djs-visual > :nth-child(1),
  43. .djs-connection.drop-not-ok .djs-visual > :nth-child(1) {
  44. stroke: #E56283 /* light-red */ !important;
  45. }
  46. .drop-not-ok,
  47. .connect-not-ok {
  48. cursor: not-allowed;
  49. }
  50. .djs-element.attach-ok .djs-visual > :nth-child(1) {
  51. stroke-width: 5px !important;
  52. stroke: rgba(255, 116, 0, 0.7) !important;
  53. }
  54. .djs-frame.connect-not-ok .djs-visual > :nth-child(1),
  55. .djs-frame.drop-not-ok .djs-visual > :nth-child(1) {
  56. stroke-width: 3px !important;
  57. stroke: #E56283 /* light-red */ !important;
  58. fill: none !important;
  59. }
  60. /**
  61. * Selection box style
  62. *
  63. */
  64. .djs-lasso-overlay {
  65. fill: rgb(255, 116, 0);
  66. fill-opacity: 0.1;
  67. stroke-dasharray: 5 1 3 1;
  68. stroke: rgb(255, 116, 0);
  69. shape-rendering: crispEdges;
  70. pointer-events: none;
  71. }
  72. /**
  73. * Resize styles
  74. */
  75. .djs-resize-overlay {
  76. fill: none;
  77. stroke-dasharray: 5 1 3 1;
  78. stroke: rgb(255, 116, 0);
  79. pointer-events: none;
  80. }
  81. .djs-resizer-hit {
  82. fill: none;
  83. pointer-events: all;
  84. }
  85. .djs-resizer-visual {
  86. fill: white;
  87. stroke-width: 1px;
  88. stroke: black;
  89. shape-rendering: crispEdges;
  90. stroke-opacity: 0.2;
  91. }
  92. .djs-cursor-resize-nwse,
  93. .djs-resizer-nw,
  94. .djs-resizer-se {
  95. cursor: nwse-resize;
  96. }
  97. .djs-cursor-resize-nesw,
  98. .djs-resizer-ne,
  99. .djs-resizer-sw {
  100. cursor: nesw-resize;
  101. }
  102. .djs-shape.djs-resizing > .djs-outline {
  103. visibility: hidden !important;
  104. }
  105. .djs-shape.djs-resizing > .djs-resizer {
  106. visibility: hidden;
  107. }
  108. .djs-dragger > .djs-resizer {
  109. visibility: hidden;
  110. }
  111. /**
  112. * drag styles
  113. */
  114. .djs-dragger * {
  115. fill: none !important;
  116. stroke: rgb(255, 116, 0) !important;
  117. }
  118. .djs-dragger tspan,
  119. .djs-dragger text {
  120. fill: rgb(255, 116, 0) !important;
  121. stroke: none !important;
  122. }
  123. marker.djs-dragger circle,
  124. marker.djs-dragger path,
  125. marker.djs-dragger polygon,
  126. marker.djs-dragger polyline,
  127. marker.djs-dragger rect {
  128. fill: rgb(255, 116, 0) !important;
  129. stroke: none !important;
  130. }
  131. marker.djs-dragger text,
  132. marker.djs-dragger tspan {
  133. fill: none !important;
  134. stroke: rgb(255, 116, 0) !important;
  135. }
  136. .djs-dragging {
  137. opacity: 0.3;
  138. }
  139. .djs-dragging,
  140. .djs-dragging > * {
  141. pointer-events: none !important;
  142. }
  143. .djs-dragging .djs-context-pad,
  144. .djs-dragging .djs-outline {
  145. display: none !important;
  146. }
  147. /**
  148. * no pointer events for visual
  149. */
  150. .djs-visual,
  151. .djs-outline {
  152. pointer-events: none;
  153. }
  154. .djs-element.attach-ok .djs-hit {
  155. stroke-width: 60px !important;
  156. }
  157. /**
  158. * all pointer events for hit shape
  159. */
  160. .djs-element > .djs-hit-all {
  161. pointer-events: all;
  162. }
  163. .djs-element > .djs-hit-stroke,
  164. .djs-element > .djs-hit-click-stroke {
  165. pointer-events: stroke;
  166. }
  167. /**
  168. * all pointer events for hit shape
  169. */
  170. .djs-drag-active .djs-element > .djs-hit-click-stroke {
  171. pointer-events: all;
  172. }
  173. /**
  174. * shape / connection basic styles
  175. */
  176. .djs-connection .djs-visual {
  177. stroke-width: 2px;
  178. fill: none;
  179. }
  180. .djs-cursor-grab {
  181. cursor: -webkit-grab;
  182. cursor: -moz-grab;
  183. cursor: grab;
  184. }
  185. .djs-cursor-grabbing {
  186. cursor: -webkit-grabbing;
  187. cursor: -moz-grabbing;
  188. cursor: grabbing;
  189. }
  190. .djs-cursor-crosshair {
  191. cursor: crosshair;
  192. }
  193. .djs-cursor-move {
  194. cursor: move;
  195. }
  196. .djs-cursor-resize-ns {
  197. cursor: ns-resize;
  198. }
  199. .djs-cursor-resize-ew {
  200. cursor: ew-resize;
  201. }
  202. /**
  203. * snapping
  204. */
  205. .djs-snap-line {
  206. stroke: rgb(255, 195, 66);
  207. stroke: rgba(255, 195, 66, 0.50);
  208. stroke-linecap: round;
  209. stroke-width: 2px;
  210. pointer-events: none;
  211. }
  212. /**
  213. * snapping
  214. */
  215. .djs-crosshair {
  216. stroke: #555;
  217. stroke-linecap: round;
  218. stroke-width: 1px;
  219. pointer-events: none;
  220. shape-rendering: crispEdges;
  221. stroke-dasharray: 5, 5;
  222. }
  223. /**
  224. * palette
  225. */
  226. .djs-palette {
  227. position: absolute;
  228. left: 20px;
  229. top: 20px;
  230. box-sizing: border-box;
  231. width: 48px;
  232. }
  233. .djs-palette .separator {
  234. margin: 0 5px;
  235. padding-top: 5px;
  236. border: none;
  237. border-bottom: solid 1px #DDD;
  238. clear: both;
  239. }
  240. .djs-palette .entry:before {
  241. vertical-align: text-bottom;
  242. }
  243. .djs-palette .djs-palette-toggle {
  244. cursor: pointer;
  245. }
  246. .djs-palette .entry,
  247. .djs-palette .djs-palette-toggle {
  248. color: #333;
  249. font-size: 30px;
  250. text-align: center;
  251. }
  252. .djs-palette .entry {
  253. float: left;
  254. }
  255. .djs-palette .entry img {
  256. max-width: 100%;
  257. }
  258. .djs-palette .djs-palette-entries:after {
  259. content: '';
  260. display: table;
  261. clear: both;
  262. }
  263. .djs-palette .djs-palette-toggle:hover {
  264. background: #666;
  265. }
  266. .djs-palette .entry:hover {
  267. color: rgb(255, 116, 0);
  268. }
  269. .djs-palette .highlighted-entry {
  270. color: rgb(255, 116, 0) !important;
  271. }
  272. .djs-palette .entry,
  273. .djs-palette .djs-palette-toggle {
  274. width: 46px;
  275. height: 46px;
  276. line-height: 46px;
  277. cursor: default;
  278. }
  279. /**
  280. * Palette open / two-column layout is controlled via
  281. * classes on the palette. Events to hook into palette
  282. * changed life-cycle are available in addition.
  283. */
  284. .djs-palette.two-column.open {
  285. width: 94px;
  286. }
  287. .djs-palette:not(.open) .djs-palette-entries {
  288. display: none;
  289. }
  290. .djs-palette:not(.open) {
  291. overflow: hidden;
  292. }
  293. .djs-palette.open .djs-palette-toggle {
  294. display: none;
  295. }
  296. /**
  297. * context-pad
  298. */
  299. .djs-overlay-context-pad {
  300. width: 72px;
  301. }
  302. .djs-context-pad {
  303. position: absolute;
  304. display: none;
  305. pointer-events: none;
  306. }
  307. .djs-context-pad .entry {
  308. width: 22px;
  309. height: 22px;
  310. text-align: center;
  311. display: inline-block;
  312. font-size: 22px;
  313. margin: 0 2px 2px 0;
  314. border-radius: 3px;
  315. cursor: default;
  316. background-color: #FEFEFE;
  317. box-shadow: 0 0 2px 1px #FEFEFE;
  318. pointer-events: all;
  319. }
  320. .djs-context-pad .entry:before {
  321. vertical-align: top;
  322. }
  323. .djs-context-pad .entry:hover {
  324. background: rgb(255, 252, 176);
  325. }
  326. .djs-context-pad.open {
  327. display: block;
  328. }
  329. /**
  330. * popup styles
  331. */
  332. .djs-popup .entry {
  333. line-height: 20px;
  334. white-space: nowrap;
  335. cursor: default;
  336. }
  337. /* larger font for prefixed icons */
  338. .djs-popup .entry:before {
  339. vertical-align: middle;
  340. font-size: 20px;
  341. }
  342. .djs-popup .entry > span {
  343. vertical-align: middle;
  344. font-size: 14px;
  345. }
  346. .djs-popup .entry:hover,
  347. .djs-popup .entry.active:hover {
  348. background: rgb(255, 252, 176);
  349. }
  350. .djs-popup .entry.disabled {
  351. background: inherit;
  352. }
  353. .djs-popup .djs-popup-header .entry {
  354. display: inline-block;
  355. padding: 2px 3px 2px 3px;
  356. border: solid 1px transparent;
  357. border-radius: 3px;
  358. }
  359. .djs-popup .djs-popup-header .entry.active {
  360. color: rgb(255, 116, 0);
  361. border: solid 1px rgb(255, 116, 0);
  362. background-color: #F6F6F6;
  363. }
  364. .djs-popup-body .entry {
  365. padding: 4px 10px 4px 5px;
  366. }
  367. .djs-popup-body .entry > span {
  368. margin-left: 5px;
  369. }
  370. .djs-popup-body {
  371. background-color: #FEFEFE;
  372. }
  373. .djs-popup-header {
  374. border-bottom: 1px solid #DDD;
  375. }
  376. .djs-popup-header .entry {
  377. margin: 1px;
  378. margin-left: 3px;
  379. }
  380. .djs-popup-header .entry:last-child {
  381. margin-right: 3px;
  382. }
  383. /**
  384. * popup / palette styles
  385. */
  386. .djs-popup, .djs-palette {
  387. background: #FAFAFA;
  388. border: solid 1px #CCC;
  389. border-radius: 2px;
  390. }
  391. /**
  392. * touch
  393. */
  394. .djs-shape,
  395. .djs-connection {
  396. touch-action: none;
  397. }
  398. .djs-segment-dragger,
  399. .djs-bendpoint {
  400. display: none;
  401. }
  402. /**
  403. * bendpoints
  404. */
  405. .djs-segment-dragger .djs-visual {
  406. fill: rgba(255, 255, 121, 0.2);
  407. stroke-width: 1px;
  408. stroke-opacity: 1;
  409. stroke: rgba(255, 255, 121, 0.3);
  410. }
  411. .djs-bendpoint .djs-visual {
  412. fill: rgba(255, 255, 121, 0.8);
  413. stroke-width: 1px;
  414. stroke-opacity: 0.5;
  415. stroke: black;
  416. }
  417. .djs-segment-dragger:hover,
  418. .djs-bendpoints.hover .djs-segment-dragger,
  419. .djs-bendpoints.selected .djs-segment-dragger,
  420. .djs-bendpoint:hover,
  421. .djs-bendpoints.hover .djs-bendpoint,
  422. .djs-bendpoints.selected .djs-bendpoint {
  423. display: block;
  424. }
  425. .djs-drag-active .djs-bendpoints * {
  426. display: none;
  427. }
  428. .djs-bendpoints:not(.hover) .floating {
  429. display: none;
  430. }
  431. .djs-segment-dragger:hover .djs-visual,
  432. .djs-segment-dragger.djs-dragging .djs-visual,
  433. .djs-bendpoint:hover .djs-visual,
  434. .djs-bendpoint.floating .djs-visual {
  435. fill: yellow;
  436. stroke-opacity: 0.5;
  437. stroke: black;
  438. }
  439. .djs-bendpoint.floating .djs-hit {
  440. pointer-events: none;
  441. }
  442. .djs-segment-dragger .djs-hit,
  443. .djs-bendpoint .djs-hit {
  444. pointer-events: all;
  445. fill: none;
  446. }
  447. .djs-segment-dragger.horizontal .djs-hit {
  448. cursor: ns-resize;
  449. }
  450. .djs-segment-dragger.vertical .djs-hit {
  451. cursor: ew-resize;
  452. }
  453. .djs-segment-dragger.djs-dragging .djs-hit {
  454. pointer-events: none;
  455. }
  456. .djs-updating,
  457. .djs-updating > * {
  458. pointer-events: none !important;
  459. }
  460. .djs-updating .djs-context-pad,
  461. .djs-updating .djs-outline,
  462. .djs-updating .djs-bendpoint,
  463. .connect-ok .djs-bendpoint,
  464. .connect-not-ok .djs-bendpoint,
  465. .drop-ok .djs-bendpoint,
  466. .drop-not-ok .djs-bendpoint {
  467. display: none !important;
  468. }
  469. .djs-segment-dragger.djs-dragging,
  470. .djs-bendpoint.djs-dragging {
  471. display: block;
  472. opacity: 1.0;
  473. }
  474. .djs-segment-dragger.djs-dragging .djs-visual,
  475. .djs-bendpoint.djs-dragging .djs-visual {
  476. fill: yellow;
  477. stroke-opacity: 0.5;
  478. }
  479. /**
  480. * tooltips
  481. */
  482. .djs-tooltip-error {
  483. font-size: 11px;
  484. line-height: 18px;
  485. text-align: left;
  486. padding: 5px;
  487. opacity: 0.7;
  488. }
  489. .djs-tooltip-error > * {
  490. width: 160px;
  491. background: rgb(252, 236, 240);
  492. color: rgb(158, 76, 76);
  493. padding: 3px 7px;
  494. border-radius: 5px;
  495. border-left: solid 5px rgb(174, 73, 73);
  496. }
  497. .djs-tooltip-error:hover {
  498. opacity: 1;
  499. }
  500. /**
  501. * search pad
  502. */
  503. .djs-search-container {
  504. position: absolute;
  505. top: 20px;
  506. left: 0;
  507. right: 0;
  508. margin-left: auto;
  509. margin-right: auto;
  510. width: 25%;
  511. min-width: 300px;
  512. max-width: 400px;
  513. z-index: 10;
  514. font-size: 1.05em;
  515. opacity: 0.9;
  516. background: #FAFAFA;
  517. border: solid 1px #CCC;
  518. border-radius: 2px;
  519. }
  520. .djs-search-container:not(.open) {
  521. display: none;
  522. }
  523. .djs-search-input input {
  524. font-size: 1.05em;
  525. width: 100%;
  526. padding: 6px 10px;
  527. border: 1px solid #ccc;
  528. }
  529. .djs-search-input input:focus {
  530. outline: none;
  531. border-color: #52B415;
  532. }
  533. .djs-search-results {
  534. position: relative;
  535. overflow-y: auto;
  536. max-height: 200px;
  537. }
  538. .djs-search-results:hover {
  539. /*background: #fffdd7;*/
  540. cursor: pointer;
  541. }
  542. .djs-search-result {
  543. width: 100%;
  544. padding: 6px 10px;
  545. background: white;
  546. border-bottom: solid 1px #AAA;
  547. border-radius: 1px;
  548. }
  549. .djs-search-highlight {
  550. color: black;
  551. }
  552. .djs-search-result-primary {
  553. margin: 0 0 10px;
  554. }
  555. .djs-search-result-secondary {
  556. font-family: monospace;
  557. margin: 0;
  558. }
  559. .djs-search-result:hover {
  560. background: #fdffd6;
  561. }
  562. .djs-search-result-selected {
  563. background: #fffcb0;
  564. }
  565. .djs-search-result-selected:hover {
  566. background: #f7f388;
  567. }
  568. .djs-search-overlay {
  569. background: yellow;
  570. opacity: 0.3;
  571. }
  572. /**
  573. * hidden styles
  574. */
  575. .djs-element-hidden,
  576. .djs-element-hidden .djs-hit,
  577. .djs-element-hidden .djs-outline,
  578. .djs-label-hidden .djs-label {
  579. display: none !important;
  580. }