|
351 | 351 | } |
352 | 352 | } |
353 | 353 | } |
| 354 | + |
| 355 | +#editorCommentsSidebar { |
| 356 | + --comment-close-button-icon: url(images/comment-closeButton.svg); |
| 357 | + |
| 358 | + --comment-date-fg-color: light-dark( |
| 359 | + rgb(21 20 26 / 0.69), |
| 360 | + rgb(251 251 254 / 0.69) |
| 361 | + ); |
| 362 | + --comment-bg-color: light-dark(#f9f9fb, #1c1b22); |
| 363 | + --comment-hover-bg-color: light-dark( |
| 364 | + rgb(21 20 26 / 0.14), |
| 365 | + rgb(251 251 254 / 0.14) |
| 366 | + ); |
| 367 | + --comment-active-bg-color: light-dark( |
| 368 | + rgb(21 20 26 / 0.21), |
| 369 | + rgb(251 251 254 / 0.21) |
| 370 | + ); |
| 371 | + --comment-border-color: light-dark(#f0f0f4, #52525e); |
| 372 | + --comment-focus-outline-color: light-dark(#0062fa, #00cadb); |
| 373 | + --comment-fg-color: light-dark(#15141a, #fbfbfe); |
| 374 | + --comment-count-bg-color: light-dark(#e2f7ff, #00317e); |
| 375 | + --comment-indicator-active-fg-color: light-dark(#0041a4, #a6ecf4); |
| 376 | + --comment-indicator-focus-fg-color: light-dark(#5b5b66, #fbfbfe); |
| 377 | + --comment-indicator-hover-fg-color: light-dark(#0053cb, #61dce9); |
| 378 | + --comment-indicator-selected-fg-color: light-dark(#0062fa, #00cadb); |
| 379 | + |
| 380 | + @media screen and (forced-colors: active) { |
| 381 | + --comment-date-fg-color: CanvasText; |
| 382 | + --comment-bg-color: Canvas; |
| 383 | + --comment-hover-bg-color: SelectedItemText; |
| 384 | + --comment-active-bg-color: SelectedItemText; |
| 385 | + --comment-border-color: CanvasText; |
| 386 | + --comment-fg-color: CanvasText; |
| 387 | + --comment-count-bg-color: Canvas; |
| 388 | + --comment-indicator-active-fg-color: SelectedItem; |
| 389 | + --comment-indicator-focus-fg-color: CanvasText; |
| 390 | + --comment-indicator-hover-fg-color: CanvasText; |
| 391 | + --comment-indicator-selected-fg-color: SelectedItem; |
| 392 | + } |
| 393 | + |
| 394 | + display: flex; |
| 395 | + width: 239px; |
| 396 | + height: auto; |
| 397 | + min-width: 180px; |
| 398 | + max-width: 632px; |
| 399 | + padding-bottom: 16px; |
| 400 | + flex-direction: column; |
| 401 | + align-items: flex-start; |
| 402 | + |
| 403 | + #editorCommentsSidebarHeader { |
| 404 | + width: 100%; |
| 405 | + box-sizing: border-box; |
| 406 | + padding: 16px; |
| 407 | + display: flex; |
| 408 | + align-items: center; |
| 409 | + justify-content: space-between; |
| 410 | + |
| 411 | + .commentCount { |
| 412 | + display: flex; |
| 413 | + align-items: baseline; |
| 414 | + gap: 6px; |
| 415 | + user-select: none; |
| 416 | + |
| 417 | + #editorCommentsSidebarTitle { |
| 418 | + font: menu; |
| 419 | + font-style: normal; |
| 420 | + font-weight: 590; |
| 421 | + line-height: normal; |
| 422 | + font-size: 17px; |
| 423 | + color: var(--comment-fg-color); |
| 424 | + } |
| 425 | + |
| 426 | + #editorCommentsSidebarCount { |
| 427 | + padding: 0 4px; |
| 428 | + border-radius: 4px; |
| 429 | + background-color: var(--comment-count-bg-color); |
| 430 | + |
| 431 | + color: var(--comment-fg-color); |
| 432 | + text-align: center; |
| 433 | + |
| 434 | + font: menu; |
| 435 | + font-size: 13px; |
| 436 | + font-style: normal; |
| 437 | + font-weight: 400; |
| 438 | + line-height: normal; |
| 439 | + } |
| 440 | + } |
| 441 | + |
| 442 | + #editorCommentsSidebarCloseButton { |
| 443 | + width: 32px; |
| 444 | + height: 32px; |
| 445 | + padding: 8px; |
| 446 | + border: none; |
| 447 | + background: none; |
| 448 | + cursor: pointer; |
| 449 | + |
| 450 | + &::before { |
| 451 | + content: ""; |
| 452 | + display: inline-block; |
| 453 | + width: 100%; |
| 454 | + height: 100%; |
| 455 | + mask-repeat: no-repeat; |
| 456 | + mask-position: center; |
| 457 | + mask-image: var(--comment-close-button-icon); |
| 458 | + background-color: var(--comment-fg-color); |
| 459 | + } |
| 460 | + |
| 461 | + &:hover { |
| 462 | + background-color: var(--comment-hover-bg-color); |
| 463 | + } |
| 464 | + |
| 465 | + &:active { |
| 466 | + background-color: var(--comment-active-bg-color); |
| 467 | + } |
| 468 | + |
| 469 | + > span { |
| 470 | + display: inline-block; |
| 471 | + width: 0; |
| 472 | + height: 0; |
| 473 | + overflow: hidden; |
| 474 | + } |
| 475 | + } |
| 476 | + } |
| 477 | + |
| 478 | + #editorCommentsSidebarList { |
| 479 | + display: flex; |
| 480 | + width: auto; |
| 481 | + padding: 1px 16px 0; |
| 482 | + gap: 10px; |
| 483 | + flex: 1 0 0; |
| 484 | + align-self: stretch; |
| 485 | + align-items: flex-start; |
| 486 | + flex-direction: column; |
| 487 | + |
| 488 | + .sidebarComment { |
| 489 | + display: flex; |
| 490 | + width: auto; |
| 491 | + padding: 8px 16px 16px; |
| 492 | + flex-direction: column; |
| 493 | + align-items: flex-start; |
| 494 | + align-self: stretch; |
| 495 | + gap: 4px; |
| 496 | + |
| 497 | + border-radius: 8px; |
| 498 | + border: 0.5px solid var(--comment-border-color); |
| 499 | + background-color: var(--comment-bg-color); |
| 500 | + |
| 501 | + &:hover { |
| 502 | + background-color: var(--comment-hover-bg-color); |
| 503 | + |
| 504 | + time::after { |
| 505 | + display: inline-block; |
| 506 | + background-color: var(--comment-indicator-hover-fg-color); |
| 507 | + } |
| 508 | + } |
| 509 | + |
| 510 | + &:active { |
| 511 | + background-color: var(--comment-active-bg-color); |
| 512 | + |
| 513 | + time::after { |
| 514 | + display: inline-block; |
| 515 | + background-color: var(--comment-indicator-active-fg-color); |
| 516 | + } |
| 517 | + } |
| 518 | + |
| 519 | + &:is(:focus, :focus-visible) time::after { |
| 520 | + display: inline-block; |
| 521 | + background-color: var(--comment-indicator-focus-fg-color); |
| 522 | + } |
| 523 | + |
| 524 | + &:focus-visible { |
| 525 | + outline: 2px solid var(--comment-focus-outline-color); |
| 526 | + outline-offset: 2px; |
| 527 | + } |
| 528 | + |
| 529 | + &.selected { |
| 530 | + .sidebarCommentText { |
| 531 | + max-height: fit-content; |
| 532 | + -webkit-line-clamp: unset; |
| 533 | + } |
| 534 | + |
| 535 | + time::after { |
| 536 | + display: inline-block; |
| 537 | + background-color: var(--comment-indicator-selected-fg-color); |
| 538 | + } |
| 539 | + } |
| 540 | + |
| 541 | + .sidebarCommentText { |
| 542 | + font: menu; |
| 543 | + font-style: normal; |
| 544 | + font-weight: 400; |
| 545 | + line-height: normal; |
| 546 | + font-size: 15px; |
| 547 | + width: 100%; |
| 548 | + height: fit-content; |
| 549 | + max-height: 80px; |
| 550 | + display: -webkit-box; |
| 551 | + -webkit-box-orient: vertical; |
| 552 | + -webkit-line-clamp: 2; |
| 553 | + overflow: hidden; |
| 554 | + overflow-wrap: break-word; |
| 555 | + |
| 556 | + &.noComments { |
| 557 | + max-height: fit-content; |
| 558 | + -webkit-line-clamp: unset; |
| 559 | + user-select: none; |
| 560 | + } |
| 561 | + } |
| 562 | + |
| 563 | + time { |
| 564 | + width: 100%; |
| 565 | + display: inline-flex; |
| 566 | + align-items: center; |
| 567 | + justify-content: space-between; |
| 568 | + |
| 569 | + font: menu; |
| 570 | + font-style: normal; |
| 571 | + font-weight: 400; |
| 572 | + line-height: normal; |
| 573 | + font-size: 13px; |
| 574 | + |
| 575 | + &::after { |
| 576 | + content: ""; |
| 577 | + display: none; |
| 578 | + width: 16px; |
| 579 | + height: 16px; |
| 580 | + mask-repeat: no-repeat; |
| 581 | + mask-position: center; |
| 582 | + mask-image: var(--comment-edit-button-icon); |
| 583 | + } |
| 584 | + } |
| 585 | + } |
| 586 | + } |
| 587 | +} |
0 commit comments