gitea源码

expander.css 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. text-expander .suggestions,
  2. .tribute-container {
  3. position: absolute;
  4. max-height: min(300px, 95vh);
  5. max-width: min(500px, 95vw);
  6. overflow-x: hidden;
  7. overflow-y: auto;
  8. white-space: nowrap;
  9. background: var(--color-menu);
  10. box-shadow: 0 6px 18px var(--color-shadow);
  11. border-radius: var(--border-radius);
  12. border: 1px solid var(--color-secondary);
  13. z-index: 100; /* needs to be > 20 to be on top of dropzone's .dz-details */
  14. }
  15. text-expander {
  16. display: block;
  17. position: relative;
  18. }
  19. text-expander .suggestions {
  20. padding: 0;
  21. margin-top: 24px;
  22. list-style: none;
  23. }
  24. text-expander .suggestions li,
  25. .tribute-item {
  26. display: flex;
  27. align-items: center;
  28. cursor: pointer;
  29. gap: 6px;
  30. font-weight: var(--font-weight-medium);
  31. }
  32. text-expander .suggestions li,
  33. .tribute-container li {
  34. padding: 3px 6px;
  35. }
  36. text-expander .suggestions li + li,
  37. .tribute-container li + li {
  38. border-top: 1px solid var(--color-secondary);
  39. }
  40. text-expander .suggestions li:first-child {
  41. border-radius: var(--border-radius) var(--border-radius) 0 0;
  42. }
  43. text-expander .suggestions li:last-child {
  44. border-radius: 0 0 var(--border-radius) var(--border-radius);
  45. }
  46. text-expander .suggestions li:only-child {
  47. border-radius: var(--border-radius);
  48. }
  49. text-expander .suggestions .fullname,
  50. .tribute-container li .fullname {
  51. font-weight: var(--font-weight-normal);
  52. color: var(--color-text-light-1);
  53. overflow: hidden;
  54. text-overflow: ellipsis;
  55. }
  56. text-expander .suggestions li:hover,
  57. text-expander .suggestions li:hover *,
  58. text-expander .suggestions li[aria-selected="true"],
  59. text-expander .suggestions li[aria-selected="true"] *,
  60. .tribute-container li.highlight,
  61. .tribute-container li.highlight * {
  62. background: var(--color-primary);
  63. color: var(--color-primary-contrast);
  64. }
  65. text-expander .suggestions img,
  66. .tribute-item img {
  67. width: 21px;
  68. height: 21px;
  69. object-fit: contain;
  70. aspect-ratio: 1;
  71. }
  72. .tribute-container {
  73. display: block;
  74. }
  75. .tribute-container ul {
  76. margin: 0;
  77. padding: 0;
  78. list-style: none;
  79. }
  80. .tribute-container li.no-match {
  81. cursor: default;
  82. }