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 285.multi-select, .single-select { 286display: flex; 287flex-flow: column nowrap; 288overflow-y: scroll; 289box-shadow: var(--shadow-card-inset); 290padding: 16px; 291gap: 8px; 292} 293 294.licence-selection, .image-type-selection { 295display: flex; 296flex-flow: column nowrap; 297} 298 299.licence-selection-info, .image-type-selection-info { 300margin-left: calc(var(--size-checkbox) + var(--gap-label-checkbox)); 301/* Align with the checkbox above */ 302} 303 304.licence-selection-info > p, .image-type-selection-info > p { 305font-weight: 300; 306} 307 308.licence-logo { 309width: 128px; 310float: right; 311margin-left: 1ch; 312} 313 314.licence-title, .image-type-title { 315display: flex; 316justify-content: space-between; 317width: 100%; 318} 319 320.licence-title > .licence-name, .image-type-title > .image-type-name { 321font: var(--h5-font); 322font-weight: 400; 323} 324 325.icon-explainer { 326display: grid; 327gap: 4px 8px; 328grid-template-columns: auto 1fr; 329align-items: center; 330} 331 332.icon-explainer *:nth-child(even) { 333font-weight: 300; 334} 335 336.required-asterisk::after { 337content: "*"; 338color: var(--color-error); 339} 340 341small { 342/* BIG :D */ 343font-size: 1em; 344} 345 346#pagination { 347display: flex; 348gap: 1em; 349justify-content: center; 350align-items: center; 351font-size: 1.5em; 352font-weight: 600; 353flex: 1 0 auto; 354} 355 356#pagination > a { 357text-decoration: none; 358color: var(--color-accent-1); 359} 360 361#pagination-options > form { 362align-items: center; 363display: flex; 364gap: 1em; 365} 366 367#pagination-options { 368justify-content: center; 369align-items: center; 370gap: 1em; 371width: 100%; 372} 373 374.thumbnail-list { 375list-style: none; 376margin: 0 !important; 377display: grid; 378grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); 379gap: 16px; 380} 381 382.thumbnail-list > li { 383transition: box-shadow 0.25s cubic-bezier(0.61, 1, 0.88, 1); 384box-shadow: var(--shadow-card); 385background: var(--color-card); 386} 387 388.thumbnail-list > li > a, .thumbnail-list > li { 389display: flex; 390flex-direction: column; 391justify-content: space-between; 392height: 100%; 393} 394 395.thumbnail-list > li > .list-more { 396display: flex; 397justify-content: space-between; 398align-items: center; 399padding: 8px; 400} 401 402.thumbnail-list > li:is(:hover, :focus, :has(:focus)) { 403box-shadow: var(--shadow-card), 0 4px 32px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08); 404} 405 406.thumbnail-list > li .annotation-zone { 407transition: transform 0.25s cubic-bezier(0.61, 1, 0.88, 1), 408box-shadow 0.25s cubic-bezier(0.61, 1, 0.88, 1); 409} 410 411.thumbnail-list > li .annotation-zone:hover { 412position: relative; 413transform: scale(2); 414z-index: 1; 415box-shadow: var(--shadow-textarea-active); 416} 417 418.thumbnail-list > li .list-detail { 419padding: 8px; 420display: block; 421} 422 423a.button { 424text-decoration: none; 425} 426 427dt { 428font-weight: 600; 429} 430 431dd { 432margin-left: 40px; 433} 434 435#mobile-navbar { 436display: none; 437} 438 439@media screen and (max-width: 576px) { 440#mobile-navbar { 441display: flex; 442} 443#desktop-navbar { 444display: none; 445} 446} 447 448#hamburger > nav { 449display: flex; 450flex-direction: column; 451gap: 1em; 452padding: var(--padding-card); 453padding-top: var(--padding-card-top); 454box-shadow: var(--shadow-card); 455background: var(--color-card); 456justify-content: space-between; 457width: clamp(240px, calc(100vw - 56px), 448px); 458} 459 460#hamburger > nav > ul { 461display: flex; 462flex-direction: column; 463gap: 1em; 464margin: 0; 465} 466 467#hamburger > nav > ul > li { 468display: flex; 469gap: var(--gap-label-checkbox); 470align-items: center; 471margin: 0; 472} 473 474#hamburger > nav > ul > li > a { 475text-decoration: none; 476color: var(--color-card-text); 477} 478 479.star-rating-container { 480display: flex; 481flex-direction: row-reverse; 482font-size: 1.25em; 483align-items: center; 484justify-content: flex-end; /* In this case, it means LEFT, not right, because of the row-reverse */ 485} 486 487.star-rating-container > input { 488width: 0 !important; 489height: 0 !important; 490visibility: hidden; 491} 492 493.star-rating-container > label { 494cursor: pointer; 495color: var(--text-softest); 496transition: color 0.25s cubic-bezier(0.37, 0, 0.63, 1), 497filter 0.25s cubic-bezier(0.37, 0, 0.63, 1); 498} 499 500.star-rating-container > label:hover, 501.star-rating-container > label:hover ~ label { 502color: var(--color-star); 503filter: drop-shadow(0 0 3px #00000040); 504} 505 506.star-rating-container > input:checked ~ label { 507color: var(--color-star); 508} 509 510.visually-hidden { 511position: absolute; 512width: 1px; 513height: 1px; 514box-sizing: content-box; 515margin: -1px; 516overflow: hidden; 517clip-path: inset(50%); 518border: 0; 519} 520 521.rating-list { 522display: grid; 523grid-auto-columns: 1fr; 524gap: 0.5rem; 525grid-template-columns: auto; 526list-style: none; 527margin: 0 !important; 528padding: 0; 529min-width: 50%; 530} 531 532.rating-list > li { 533grid-column-start: 1; 534height: 28px; 535padding: 4px 8px; 536display: flex; 537align-items: center; 538justify-content: space-between; 539gap: 0.5rch; 540border-radius: 0 4px 4px 0; 541margin: 0; 542} 543 544.rating-bar { 545display: flex; 546align-items: center; 547justify-content: flex-start; 548gap: 0.5rch; 549font-size: 1.25em; 550width: 100%; 551} 552 553.rating-bar > .rating-bar-segment { 554position: relative; 555width: 1em; 556height: 1em; 557clip-path: url(#star-clip); 558background: var(--text-softest); 559} 560 561.rating-bar > .rating-bar-segment > .rating-bar-filling { 562background: var(--color-star); 563height: 100%; 564position: absolute; 565top: 0; 566left: 0; 567} 568 569#picture-view { 570display: flex; 571flex-direction: row; 572gap: 1em; 573align-items: flex-start; 574justify-content: center; 575width: fit-content; 576margin: 0 auto; 577} 578 579#picture-actions { 580--width: 256px; 581position: sticky; 582top: 0; 583overflow: auto; 584max-height: 100vh; 585height: 100%; 586background: var(--color-card); 587padding: 1rem 0; 588box-shadow: var(--shadow-card); 589} 590 591@media screen and (max-width: 768px) { 592#picture-view { 593flex-direction: column; 594} 595#picture-actions { 596--width: 768px; 597position: static; 598padding: 1rem; 599} 600#picture-actions > ul { 601width: 100%; 602list-style: none; 603margin: 0; 604padding: 0; 605} 606#picture-actions > ul > li { 607display: inline; 608} 609.action-list > li { 610padding: 0 !important; 611} 612} 613 614.action-list { 615list-style: none; 616margin: 0 !important; 617padding: 0; 618} 619 620.action-list > li { 621display: flex; 622margin: 0; 623width: 100%; 624padding: 0.25rem 1rem; 625} 626 627.action-list > li > a { 628text-decoration: none; 629color: var(--color-card-text) !important; 630display: flex; 631align-items: center; 632gap: 0.5rch; 633font-weight: 400; 634} 635 636.action-list > li > details > summary { 637color: var(--color-card-text) !important; 638display: flex; 639align-items: center; 640gap: 0.5rch; 641font-weight: 400; 642} 643 644#picture-buttons { 645padding: 0 1rem; 646} 647 648@media print { 649#picture-actions, #annotation-view-controls { 650display: none; 651} 652.navbar { 653display: none; 654} 655:root { 656--color-background: #ffffff; 657} 658#annotation-zone, .thumbnail-list { 659width: 100vw; 660height: auto; 661position: relative; 662left: calc(-1 * (50vw - 50%)); 663} 664} 665