style.css
ASCII text
1@import "/static/efficient-ui/MASTER.css"; 2 3:root { 4--gap-navbar: 1rem; 5--width-navbar-button: 0; 6--text-soft: #000000C0; 7--text-softer: #0000009A; 8--text-faint: #00000066; 9--color-shape-label: #0097A7; --color-shape-label-text: #ffffff; 10/*view-transition-name: root;*/ 11} 12 13nav { 14/*view-transition-name: nav;*/ 15} 16 17p { 18color: var(--text-soft); 19} 20 21iconify-icon { 22display: inline-block; 23width: 1em; 24height: 1em; 25} 26 27:is(#shape-selector, #shape-options) > button > iconify-icon { 28font-size: 2rem; 29} 30 31#annotation-zone { 32position: relative; 33user-select: none; 34} 35 36#annotation-image { 37user-drag: none; 38-webkit-user-drag: none; 39image-rendering: pixelated; 40} 41 42#annotation-zone > svg { 43z-index: 1; 44position: absolute; 45top: 0; 46left: 0; 47width: 100%; 48height: 100%; 49} 50 51.annotation-ruler { 52z-index: 2; 53position: absolute; 54top: 0; 55left: 0; 56background: var(--color-accent); 57display: none; 58} 59 60#annotation-ruler-horizontal, #annotation-ruler-horizontal-secondary { 61height: 1px; 62width: 100%; 63} 64 65#annotation-ruler-vertical, #annotation-ruler-vertical-secondary { 66width: 1px; 67height: 100%; 68} 69 70.shape { 71stroke: var(--color-accent); 72fill: var(--color-accent); 73fill-opacity: 0.1; 74stroke-width: 2px; 75vector-effect: non-scaling-stroke; 76pointer-events: auto; 77transition: filter 0.25s cubic-bezier(0.61, 1, 0.88, 1), 78fill-opacity 0.25s cubic-bezier(0.61, 1, 0.88, 1), 79stroke-width 0.25s cubic-bezier(0.61, 1, 0.88, 1); 80stroke-linecap: square; 81stroke-linejoin: miter; 82} 83 84.shape-polyline { 85fill: none; 86} 87 88.shape-point { 89stroke: var(--color-accent); 90stroke-width: 2px; 91fill-opacity: 1; 92r: 2; 93transition: r 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), 94stroke-width 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), 95filter 0.25s cubic-bezier(0.61, 1, 0.88, 1); 96} 97 98.shape.selected { 99fill-opacity: 0.2; 100stroke-width: 4px; 101filter: drop-shadow(0 0 2px var(--text-soft)); 102} 103 104.shape-point.selected { 105fill-opacity: 1; 106r: 6; 107stroke-width: 6px; 108} 109 110.shape-container, .shape-container-viewonly { 111pointer-events: none; 112} 113 114#annotation-helper-message { 115min-height: 2lh; 116} 117 118.shape-container-viewonly > .shape { 119fill: var(--color-info); 120stroke: var(--color-info); 121fill-opacity: 0; 122stroke-opacity: 0; 123transition: fill-opacity 0.25s cubic-bezier(0.61, 1, 0.88, 1), 124stroke-opacity 0.25s cubic-bezier(0.61, 1, 0.88, 1); 125} 126 127.shape-container-viewonly > .shape-polyline { 128fill: none; 129} 130 131.shape-container-viewonly > .shape-point { 132stroke: var(--color-info); 133transition: r 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), 134stroke-width 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), 135filter 0.25s cubic-bezier(0.61, 1, 0.88, 1); 136} 137 138.shape-label { 139font-size: 1.5rem; 140font-weight: 500; 141color: var(--color-shape-label-text); 142pointer-events: none; 143height: 32px; 144padding-left: 8px; 145padding-right: 8px; 146display: flex; 147align-items: center; 148justify-content: center; 149background: var(--color-shape-label); 150width: max-content; 151box-shadow: var(--shadow-button); 152/* top-left corner is square to point to the shape */ 153border-radius: 0 16px 16px 16px; 154opacity: 0; 155transition: opacity 0.25s cubic-bezier(0.61, 1, 0.88, 1), 156transform 0.375s cubic-bezier(0.16, 1, 0.3, 1); 157transform: scale(0); 158transform-origin: top left; 159z-index: 3; 160} 161 162/* Only show region parts when checkbox is checked */ 163#annotation-zone:has(+ x-buttonbox #show-objects:checked) > .shape-container-viewonly > foreignObject > .shape-label { 164opacity: 1; 165transform: scale(1); 166} 167 168/* Hide points with a bubble */ 169#annotation-zone:has(+ x-buttonbox #show-objects:checked) > .shape-container-viewonly > .shape-point:has(+ foreignObject) { 170r: 0; 171border-width: 0; 172} 173 174#annotation-zone:has(+ x-buttonbox #show-shapes:checked) > .shape-container-viewonly > .shape { 175fill-opacity: 0.1; 176stroke-opacity: 1; 177} 178 179/* Disabled for now, until there is more navigation that would benefit from transitions */ 180/* 181@view-transition { 182navigation: auto; 183} 184 185@keyframes move-out { 186from { 187transform: translateX(0%); 188} 189to { 190transform: translateX(-100%); 191} 192} 193 194@keyframes move-in { 195from { 196transform: translateX(100%); 197} 198to { 199transform: translateX(0%); 200} 201} 202 203@media (prefers-reduced-motion: no-preference) { 204::view-transition-old(root), 205::view-transition-new(root) { 206animation-duration: 0.25s; 207animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); 208} 209 210::view-transition-old(root) { 211animation-name: move-out; 212} 213 214::view-transition-new(root) { 215animation-name: move-in; 216} 217} 218*/ 219