|
| 1 | +.MafsView { |
| 2 | + display: block; |
| 3 | + background: var(--mafs-bg); |
| 4 | + overflow: hidden; |
| 5 | + -webkit-user-select: none; |
| 6 | + user-select: none; |
| 7 | + font-family: inherit; |
| 8 | + font-variant-numeric: tabular-nums; |
| 9 | + touch-action: none; |
| 10 | + outline: 0; |
| 11 | + |
| 12 | + --mafs-bg: black; |
| 13 | + --mafs-fg: white; |
| 14 | + |
| 15 | + --mafs-origin-color: var(--mafs-fg); |
| 16 | + --mafs-line-color: #555; |
| 17 | + --mafs-line-stroke-dash-style: 4, 3; |
| 18 | + --mafs-axis-stroke-width: 1px; |
| 19 | + --grid-line-subdivision-color: #222; |
| 20 | + |
| 21 | + --mafs-red: #f11d0e; |
| 22 | + --mafs-orange: #f14e0e; |
| 23 | + --mafs-yellow: #ffe44a; |
| 24 | + --mafs-green: #15e272; |
| 25 | + --mafs-blue: #58a6ff; |
| 26 | + --mafs-indigo: #7c58ff; |
| 27 | + --mafs-violet: #ae58ff; |
| 28 | + --mafs-pink: #ee00ab; |
| 29 | +} |
| 30 | + |
| 31 | +.MafsView text { |
| 32 | + fill: var(--mafs-fg); |
| 33 | + cursor: default; |
| 34 | +} |
| 35 | + |
| 36 | +.MafsView path { |
| 37 | + stroke: var(--mafs-fg); |
| 38 | +} |
| 39 | + |
| 40 | +.MafsView:focus-visible { |
| 41 | + border-radius: 5px; |
| 42 | + outline: 3px solid #58a6ff; |
| 43 | +} |
| 44 | + |
| 45 | +@supports not selector(:focus-visible) { |
| 46 | + .MafsView:focus { |
| 47 | + border-radius: 5px; |
| 48 | + outline: 3px solid #58a6ff; |
| 49 | + } |
| 50 | +} |
| 51 | + |
| 52 | +.mafs-shadow { |
| 53 | + paint-order: stroke; |
| 54 | + stroke-width: 3px; |
| 55 | + stroke: var(--mafs-bg); |
| 56 | + stroke-opacity: 0.75; |
| 57 | + stroke-linejoin: round; |
| 58 | +} |
| 59 | + |
| 60 | +.mafs-movable-point { |
| 61 | + cursor: grab; |
| 62 | + touch-action: none; |
| 63 | +} |
| 64 | + |
| 65 | +.mafs-movable-point-dragging { |
| 66 | + cursor: grabbing; |
| 67 | +} |
| 68 | + |
| 69 | +.mafs-movable-point:focus { |
| 70 | + outline: 0; |
| 71 | +} |
| 72 | + |
| 73 | +.mafs-movable-point * { |
| 74 | + fill: none; |
| 75 | + stroke: none; |
| 76 | +} |
| 77 | + |
| 78 | +.mafs-movable-point-hitbox { |
| 79 | + fill: transparent; |
| 80 | +} |
| 81 | + |
| 82 | +.mafs-movable-point-focus { |
| 83 | + stroke: var(--movable-point-color); |
| 84 | + stroke-width: 2; |
| 85 | + stroke-opacity: 0; |
| 86 | + fill: none; |
| 87 | + transition: stroke-opacity 0.2s ease; |
| 88 | +} |
| 89 | + |
| 90 | +.mafs-movable-point-ring { |
| 91 | + fill: var(--movable-point-color); |
| 92 | + fill-opacity: 0.25; |
| 93 | + stroke: none; |
| 94 | + transition: r 0.2s ease; |
| 95 | +} |
| 96 | + |
| 97 | +.mafs-movable-point-point { |
| 98 | + fill: var(--movable-point-color); |
| 99 | + transition: r 0.2s ease; |
| 100 | +} |
| 101 | + |
| 102 | +/* Hover */ |
| 103 | + |
| 104 | +.mafs-movable-point:hover .mafs-movable-point-point, |
| 105 | +.mafs-movable-point:focus-visible .mafs-movable-point-point { |
| 106 | + r: calc(var(--movable-point-ring-size) - 2px); |
| 107 | +} |
| 108 | + |
| 109 | +.mafs-movable-point:hover .mafs-movable-point-ring, |
| 110 | +.mafs-movable-point:focus-visible .mafs-movable-point-ring { |
| 111 | + r: calc(var(--movable-point-ring-size) + 3px); |
| 112 | +} |
| 113 | + |
| 114 | +.mafs-movable-point.mafs-movable-point-dragging .mafs-movable-point-ring { |
| 115 | + r: var(--movable-point-ring-size); |
| 116 | +} |
| 117 | + |
| 118 | +/* Focus */ |
| 119 | + |
| 120 | +.mafs-movable-point:focus-visible .mafs-movable-point-focus { |
| 121 | + stroke-opacity: 1; |
| 122 | +} |
0 commit comments