diagram-js.css 11 KB

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