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--text-softest: #00000033; 10--color-star: #FFC107; 11--color-shape-label: #0097A7; --color-shape-label-text: #ffffff; 12--shadow-card-inset: inset 0 3px 6px -4px rgba(0, 0, 0, 0.12), inset 0 3px 6px 0 rgba(0, 0, 0, 0.24), inset 0 1px 4px 0 rgba(0, 0, 0, 0.12); 13--1-star: #FF8079; 14--2-star: #FF8A65; 15--3-star: #FFAC1B; 16--4-star: #FBC02D; 17--5-star: #CDDC39; 18/*view-transition-name: root;*/ 19} 20 21.ripple-pad { 22background: #ffffff99; 23position: absolute; 24opacity: 1; 25transform: scale(0); 26animation: RippleEffect 375ms cubic-bezier(0, 0.55, 0.45, 1) forwards; 27} 28 29.button-flat .ripple-pad { 30background: var(--color-primary-3); 31} 32 33@keyframes RippleEffect { 34to { 35transform: scale(1); 36opacity: 0; 37} 38} 39 40button, input, .button:not(.link-button), select, .navbar a, .navrail a { 41position: relative; 42overflow: hidden; 43} 44 45nav { 46/*view-transition-name: nav;*/ 47} 48 49p { 50color: var(--text-soft); 51} 52 53iconify-icon { 54/* Material design icons are done in 24px, so we scale them to 1.5 as the default font size is 16px */ 55display: inline-block; 56width: 1em; 57height: 1em; 58font-size: 1.5em; 59} 60 61:is(#shape-selector, #shape-options) > button > iconify-icon { 62font-size: 2rem; 63} 64 65#annotation-zone, .annotation-zone { 66position: relative; 67user-select: none; 68overflow: hidden; 69} 70 71#annotation-image, .annotation-image { 72user-drag: none; 73-webkit-user-drag: none; 74image-rendering: pixelated; 75} 76 77#annotation-zone > svg, .annotation-zone > svg { 78z-index: 1; 79position: absolute; 80top: 0; 81left: 0; 82width: 100%; 83height: 100%; 84} 85 86.annotation-ruler { 87z-index: 2; 88position: absolute; 89top: 0; 90left: 0; 91background: var(--color-accent); 92display: none; 93} 94 95#annotation-ruler-horizontal, #annotation-ruler-horizontal-secondary { 96height: 1px; 97width: 100%; 98} 99 100#annotation-ruler-vertical, #annotation-ruler-vertical-secondary { 101width: 1px; 102height: 100%; 103} 104 105.shape { 106stroke: var(--color-accent); 107fill: var(--color-accent); 108fill-opacity: 0.1; 109stroke-width: 2px; 110vector-effect: non-scaling-stroke; 111pointer-events: auto; 112transition: filter 0.25s cubic-bezier(0.61, 1, 0.88, 1), 113fill-opacity 0.25s cubic-bezier(0.61, 1, 0.88, 1), 114stroke-width 0.25s cubic-bezier(0.61, 1, 0.88, 1); 115stroke-linecap: square; 116stroke-linejoin: miter; 117} 118 119.shape-polyline { 120fill: none; 121} 122 123.shape-point { 124stroke: var(--color-accent); 125stroke-width: 2px; 126fill-opacity: 1; 127r: 2; 128transition: r 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), 129stroke-width 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), 130filter 0.25s cubic-bezier(0.61, 1, 0.88, 1); 131} 132 133.shape.selected { 134fill-opacity: 0.2; 135stroke-width: 4px; 136filter: drop-shadow(0 0 2px var(--text-soft)); 137} 138 139.shape-point.selected { 140fill-opacity: 1; 141r: 6; 142stroke-width: 6px; 143} 144 145.shape-container, .shape-container-viewonly { 146pointer-events: none; 147} 148 149#annotation-helper-message { 150min-height: 2lh; 151} 152 153.shape-container-viewonly > .shape, .thumbnail-list > li .shape { 154fill: var(--color-info); 155stroke: var(--color-info); 156fill-opacity: 0; 157stroke-opacity: 0; 158transition: fill-opacity 0.25s cubic-bezier(0.61, 1, 0.88, 1), 159stroke-opacity 0.25s cubic-bezier(0.61, 1, 0.88, 1); 160} 161 162.shape-container-viewonly > .shape-polyline, .thumbnail-list > li .shape-polyline { 163fill: none; 164} 165 166.shape-container-viewonly > .shape-point, .thumbnail-list > li .shape-point { 167stroke: var(--color-info); 168transition: r 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), 169stroke-width 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), 170filter 0.25s cubic-bezier(0.61, 1, 0.88, 1); 171} 172 173.shape-label { 174position: absolute; 175font-weight: 500; 176color: var(--color-shape-label-text) !important; 177pointer-events: auto; 178height: 28px; 179padding-left: 8px; 180padding-right: 8px; 181display: flex; 182align-items: center; 183justify-content: center; 184background: var(--color-shape-label); 185width: max-content; 186box-shadow: var(--shadow-button); 187/* top-left corner is square to point to the shape */ 188border-radius: 0 16px 16px 16px; 189opacity: 0; 190transition: opacity 0.25s cubic-bezier(0.61, 1, 0.88, 1), 191transform 0.375s cubic-bezier(0.16, 1, 0.3, 1); 192transform: scale(0); 193transform-origin: top left; 194z-index: 3; 195text-decoration: none; 196} 197 198.shape-label:hover { 199text-decoration: underline; 200} 201 202/* Only show region parts when checkbox is checked */ 203#annotation-zone:has(+ x-buttonbox #show-objects:checked) > .shape-label { 204opacity: 1; 205transform: scale(1); 206} 207 208/* Hide points with a bubble */ 209#annotation-zone:has(+ x-buttonbox #show-objects:checked) > .shape-container-viewonly > .shape-point:has(+ foreignObject) { 210r: 0; 211border-width: 0; 212} 213 214#annotation-zone:has(+ x-buttonbox #show-shapes:checked) > .shape-container-viewonly > .shape { 215fill-opacity: 0.1; 216stroke-opacity: 1; 217} 218 219.thumbnail-list > li:is(:hover, :focus, :has(:focus)) .shape { 220fill-opacity: 0.2; 221stroke-opacity: 1; 222} 223 224/* Disabled for now, until there is more navigation that would benefit from transitions */ 225/* 226@view-transition { 227navigation: auto; 228} 229 230@keyframes move-out { 231from { 232transform: translateX(0%); 233} 234to { 235transform: translateX(-100%); 236} 237} 238 239@keyframes move-in { 240from { 241transform: translateX(100%); 242} 243to { 244transform: translateX(0%); 245} 246} 247 248@media (prefers-reduced-motion: no-preference) { 249::view-transition-old(root), 250::view-transition-new(root) { 251animation-duration: 0.25s; 252animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); 253} 254 255::view-transition-old(root) { 256animation-name: move-out; 257} 258 259::view-transition-new(root) { 260animation-name: move-in; 261} 262} 263*/ 264 265.multi-select, .single-select { 266display: flex; 267flex-flow: column nowrap; 268overflow-y: scroll; 269box-shadow: var(--shadow-card-inset); 270padding: 16px; 271gap: 8px; 272} 273 274.licence-selection, .image-type-selection { 275display: flex; 276flex-flow: column nowrap; 277} 278 279.licence-selection-info, .image-type-selection-info { 280margin-left: calc(var(--size-checkbox) + var(--gap-label-checkbox)); 281/* Align with the checkbox above */ 282} 283 284.licence-selection-info > p, .image-type-selection-info > p { 285font-weight: 300; 286} 287 288.licence-logo { 289width: 128px; 290float: right; 291margin-left: 1ch; 292} 293 294.licence-title, .image-type-title { 295display: flex; 296justify-content: space-between; 297width: 100%; 298} 299 300.licence-title > .licence-name, .image-type-title > .image-type-name { 301font: var(--h5-font); 302font-weight: 400; 303} 304 305.icon-explainer { 306display: grid; 307gap: 4px 8px; 308grid-template-columns: auto 1fr; 309align-items: center; 310} 311 312.icon-explainer *:nth-child(even) { 313font-weight: 300; 314} 315 316.required-asterisk::after { 317content: "*"; 318color: var(--color-error); 319} 320 321small { 322/* BIG :D */ 323font-size: 1em; 324} 325 326#pagination { 327display: flex; 328gap: 1em; 329justify-content: center; 330align-items: center; 331font-size: 1.5em; 332font-weight: 600; 333flex: 1 0 auto; 334} 335 336#pagination > a { 337text-decoration: none; 338color: var(--color-accent-1); 339} 340 341#pagination-options > form { 342align-items: center; 343display: flex; 344gap: 1em; 345} 346 347#pagination-options { 348justify-content: center; 349align-items: center; 350gap: 1em; 351width: 100%; 352} 353 354.thumbnail-list { 355list-style: none; 356margin: 0 !important; 357display: grid; 358grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); 359gap: 16px; 360} 361 362.thumbnail-list > li { 363transition: box-shadow 0.25s cubic-bezier(0.61, 1, 0.88, 1); 364box-shadow: var(--shadow-card); 365background: var(--color-card); 366} 367 368.thumbnail-list > li > a, .thumbnail-list > li { 369display: flex; 370flex-direction: column; 371justify-content: space-between; 372height: 100%; 373} 374 375.thumbnail-list > li > .list-more { 376display: flex; 377justify-content: space-between; 378align-items: center; 379padding: 8px; 380} 381 382.thumbnail-list > li:is(:hover, :focus, :has(:focus)) { 383box-shadow: var(--shadow-card), 0 4px 32px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08); 384} 385 386.thumbnail-list > li .annotation-zone { 387transition: transform 0.25s cubic-bezier(0.61, 1, 0.88, 1), 388box-shadow 0.25s cubic-bezier(0.61, 1, 0.88, 1); 389} 390 391.thumbnail-list > li .annotation-zone:hover { 392position: relative; 393transform: scale(2); 394z-index: 1; 395box-shadow: var(--shadow-textarea-active); 396} 397 398.thumbnail-list > li .list-detail { 399padding: 8px; 400display: block; 401} 402 403a.button { 404text-decoration: none; 405} 406 407dt { 408font-weight: 600; 409} 410 411dd { 412margin-left: 40px; 413} 414 415#mobile-navbar { 416display: none; 417} 418 419@media screen and (max-width: 576px) { 420#mobile-navbar { 421display: flex; 422} 423#desktop-navbar { 424display: none; 425} 426} 427 428#hamburger > nav { 429display: flex; 430flex-direction: column; 431gap: 1em; 432padding: var(--padding-card); 433padding-top: var(--padding-card-top); 434box-shadow: var(--shadow-card); 435background: var(--color-card); 436justify-content: space-between; 437width: clamp(240px, calc(100vw - 56px), 448px); 438} 439 440#hamburger > nav > ul { 441display: flex; 442flex-direction: column; 443gap: 1em; 444margin: 0; 445} 446 447#hamburger > nav > ul > li { 448display: flex; 449gap: var(--gap-label-checkbox); 450align-items: center; 451margin: 0; 452} 453 454#hamburger > nav > ul > li > a { 455text-decoration: none; 456color: var(--color-card-text); 457} 458 459.star-rating-container { 460display: flex; 461flex-direction: row-reverse; 462font-size: 1.25em; 463align-items: center; 464justify-content: flex-end; /* In this case, it means LEFT, not right, because of the row-reverse */ 465} 466 467.star-rating-container > input { 468width: 0 !important; 469height: 0 !important; 470visibility: hidden; 471} 472 473.star-rating-container > label { 474cursor: pointer; 475color: var(--text-softest); 476transition: color 0.25s cubic-bezier(0.37, 0, 0.63, 1), 477filter 0.25s cubic-bezier(0.37, 0, 0.63, 1); 478} 479 480.star-rating-container > label:hover, 481.star-rating-container > label:hover ~ label { 482color: var(--color-star); 483filter: drop-shadow(0 0 3px #00000040); 484} 485 486.star-rating-container > input:checked ~ label { 487color: var(--color-star); 488} 489 490.visually-hidden { 491position: absolute; 492width: 1px; 493height: 1px; 494box-sizing: content-box; 495margin: -1px; 496overflow: hidden; 497clip-path: inset(50%); 498border: 0; 499} 500 501.rating-list { 502display: grid; 503grid-auto-columns: 1fr; 504gap: 0.5rem; 505grid-template-columns: auto; 506list-style: none; 507margin: 0 !important; 508padding: 0; 509min-width: 50%; 510} 511 512.rating-list > li { 513grid-column-start: 1; 514height: 28px; 515padding: 4px 8px; 516display: flex; 517align-items: center; 518justify-content: space-between; 519gap: 0.5rch; 520border-radius: 0 4px 4px 0; 521margin: 0; 522} 523 524.rating-bar { 525display: flex; 526align-items: center; 527justify-content: flex-start; 528gap: 0.5rch; 529font-size: 1.25em; 530width: 100%; 531} 532 533.rating-bar > .rating-bar-segment { 534position: relative; 535width: 1em; 536height: 1em; 537clip-path: url(#star-clip); 538background: var(--text-softest); 539} 540 541.rating-bar > .rating-bar-segment > .rating-bar-filling { 542background: var(--color-star); 543height: 100%; 544position: absolute; 545top: 0; 546left: 0; 547} 548 549#picture-view { 550display: flex; 551flex-direction: row; 552gap: 1em; 553align-items: flex-start; 554justify-content: center; 555width: fit-content; 556margin: 0 auto; 557} 558 559#picture-actions { 560--width: 256px; 561position: sticky; 562top: 0; 563overflow: auto; 564max-height: 100vh; 565height: 100%; 566background: var(--color-card); 567padding: 1rem 0; 568box-shadow: var(--shadow-card); 569} 570 571@media screen and (max-width: 768px) { 572#picture-view { 573flex-direction: column; 574} 575#picture-actions { 576--width: 768px; 577position: static; 578padding: 1rem; 579} 580#picture-actions > ul { 581width: 100%; 582list-style: none; 583margin: 0; 584padding: 0; 585} 586#picture-actions > ul > li { 587display: inline; 588} 589#picture-actions > ul > li:not(:last-child)::after { 590content: " | "; 591} 592.action-list > li { 593padding: 0 !important; 594} 595} 596 597.action-list { 598list-style: none; 599margin: 0 !important; 600padding: 0; 601} 602 603.action-list > li { 604display: flex; 605margin: 0; 606width: 100%; 607padding: 0.25rem 1rem; 608} 609 610.action-list > li > a { 611text-decoration: none; 612color: var(--color-card-text) !important; 613display: flex; 614align-items: center; 615gap: 0.5rch; 616font-weight: 400; 617} 618 619.action-list > li > details > summary { 620color: var(--color-card-text) !important; 621display: flex; 622align-items: center; 623gap: 0.5rch; 624font-weight: 400; 625} 626 627#picture-buttons { 628padding: 0 1rem; 629} 630 631@media print { 632#picture-actions, #annotation-view-controls { 633display: none; 634} 635.navbar { 636display: none; 637} 638:root { 639--color-background: #ffffff; 640} 641#annotation-zone, .thumbnail-list { 642width: 100vw; 643height: auto; 644position: relative; 645left: calc(-1 * (50vw - 50%)); 646} 647} 648