index.less 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. @import url('./themes/index');
  2. .noScalingStroke() {
  3. vector-effect: non-scaling-stroke;
  4. }
  5. .@{x6-prefix}-graph {
  6. position: relative;
  7. overflow: hidden;
  8. outline: none;
  9. touch-action: none;
  10. &-background,
  11. &-grid,
  12. &-svg {
  13. position: absolute;
  14. top: 0;
  15. right: 0;
  16. bottom: 0;
  17. left: 0;
  18. &-stage {
  19. user-select: none;
  20. }
  21. }
  22. &&-pannable {
  23. cursor: grab;
  24. cursor: -moz-grab;
  25. cursor: -webkit-grab;
  26. }
  27. &&-panning {
  28. cursor: grabbing;
  29. cursor: -moz-grabbing;
  30. cursor: -webkit-grabbing;
  31. user-select: none;
  32. }
  33. }
  34. .@{x6-prefix}-node {
  35. cursor: move;
  36. &&-immovable {
  37. cursor: default;
  38. }
  39. * {
  40. -webkit-user-drag: none;
  41. }
  42. .scalable * {
  43. .noScalingStroke();
  44. }
  45. [magnet='true'] {
  46. cursor: crosshair;
  47. transition: opacity 0.3s;
  48. &:hover {
  49. opacity: 0.7;
  50. }
  51. }
  52. /* stylelint-disable-next-line */
  53. foreignObject {
  54. display: block;
  55. overflow: visible;
  56. background-color: transparent;
  57. & > body {
  58. position: static;
  59. width: 100%;
  60. height: 100%;
  61. margin: 0;
  62. padding: 0;
  63. overflow: visible;
  64. background-color: transparent;
  65. }
  66. }
  67. }
  68. .@{x6-prefix}-edge {
  69. .source-marker,
  70. .target-marker {
  71. .noScalingStroke();
  72. }
  73. .connection {
  74. stroke-linejoin: round;
  75. fill: none;
  76. }
  77. .connection-wrap {
  78. cursor: move;
  79. opacity: 0;
  80. fill: none;
  81. stroke: #000;
  82. stroke-width: 15;
  83. stroke-linecap: round;
  84. stroke-linejoin: round;
  85. &:hover {
  86. opacity: 0.4;
  87. stroke-opacity: 0.4;
  88. }
  89. }
  90. .vertices {
  91. cursor: move;
  92. opacity: 0;
  93. .vertex {
  94. fill: #1abc9c;
  95. :hover {
  96. fill: #34495e;
  97. stroke: none;
  98. }
  99. }
  100. .vertex-remove {
  101. cursor: pointer;
  102. fill: #fff;
  103. }
  104. .vertex-remove-area {
  105. cursor: pointer;
  106. opacity: 0.1;
  107. }
  108. .vertex-group:hover .vertex-remove-area {
  109. opacity: 1;
  110. }
  111. }
  112. .arrowheads {
  113. cursor: move;
  114. opacity: 0;
  115. .arrowhead {
  116. fill: #1abc9c;
  117. :hover {
  118. fill: #f39c12;
  119. stroke: none;
  120. }
  121. }
  122. }
  123. .tools {
  124. cursor: pointer;
  125. opacity: 0;
  126. .tool-options {
  127. display: none;
  128. }
  129. .tool-remove circle {
  130. fill: #f00;
  131. }
  132. .tool-remove path {
  133. fill: #fff;
  134. }
  135. }
  136. &:hover {
  137. .vertices,
  138. .arrowheads,
  139. .tools {
  140. opacity: 1;
  141. }
  142. }
  143. }
  144. .@{x6-prefix}-highlight-opacity {
  145. opacity: 0.3;
  146. }