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