line-comment.css 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. [data-component="line-comment"] {
  2. position: absolute;
  3. right: 24px;
  4. z-index: var(--line-comment-z, 30);
  5. }
  6. [data-component="line-comment"][data-open] {
  7. z-index: var(--line-comment-open-z, 100);
  8. }
  9. [data-component="line-comment"] [data-slot="line-comment-button"] {
  10. width: 20px;
  11. height: 20px;
  12. border-radius: var(--radius-md);
  13. display: flex;
  14. align-items: center;
  15. justify-content: center;
  16. background: var(--icon-interactive-base);
  17. box-shadow: var(--shadow-xs);
  18. cursor: default;
  19. border: none;
  20. }
  21. [data-component="line-comment"] [data-component="icon"] {
  22. color: var(--white);
  23. }
  24. [data-component="line-comment"] [data-slot="line-comment-button"]:focus {
  25. outline: none;
  26. }
  27. [data-component="line-comment"] [data-slot="line-comment-button"]:focus-visible {
  28. box-shadow: var(--shadow-xs-border-focus);
  29. }
  30. [data-component="line-comment"] [data-slot="line-comment-popover"] {
  31. position: absolute;
  32. top: calc(100% + 4px);
  33. right: -8px;
  34. z-index: var(--line-comment-popover-z, 40);
  35. min-width: 200px;
  36. max-width: min(320px, calc(100vw - 48px));
  37. border-radius: 8px;
  38. background: var(--surface-raised-stronger-non-alpha);
  39. box-shadow: var(--shadow-lg-border-base);
  40. padding: 12px;
  41. }
  42. [data-component="line-comment"][data-variant="editor"] [data-slot="line-comment-popover"] {
  43. width: 380px;
  44. max-width: min(380px, calc(100vw - 48px));
  45. padding: 8px;
  46. border-radius: 14px;
  47. }
  48. [data-component="line-comment"] [data-slot="line-comment-content"] {
  49. display: flex;
  50. flex-direction: column;
  51. gap: 6px;
  52. }
  53. [data-component="line-comment"] [data-slot="line-comment-text"] {
  54. font-family: var(--font-family-sans);
  55. font-size: var(--font-size-base);
  56. font-weight: var(--font-weight-regular);
  57. line-height: var(--line-height-x-large);
  58. letter-spacing: var(--letter-spacing-normal);
  59. color: var(--text-strong);
  60. white-space: pre-wrap;
  61. }
  62. [data-component="line-comment"] [data-slot="line-comment-label"],
  63. [data-component="line-comment"] [data-slot="line-comment-editor-label"] {
  64. font-family: var(--font-family-sans);
  65. font-size: var(--font-size-small);
  66. font-weight: var(--font-weight-medium);
  67. line-height: var(--line-height-large);
  68. letter-spacing: var(--letter-spacing-normal);
  69. color: var(--text-weak);
  70. white-space: nowrap;
  71. }
  72. [data-component="line-comment"] [data-slot="line-comment-editor"] {
  73. display: flex;
  74. flex-direction: column;
  75. gap: 8px;
  76. }
  77. [data-component="line-comment"] [data-slot="line-comment-textarea"] {
  78. width: 100%;
  79. resize: vertical;
  80. padding: 8px;
  81. border-radius: var(--radius-md);
  82. background: var(--surface-base);
  83. border: 1px solid var(--border-base);
  84. color: var(--text-strong);
  85. font-family: var(--font-family-sans);
  86. font-size: var(--font-size-small);
  87. line-height: var(--line-height-large);
  88. }
  89. [data-component="line-comment"] [data-slot="line-comment-textarea"]:focus {
  90. outline: none;
  91. box-shadow: var(--shadow-xs-border-select);
  92. }
  93. [data-component="line-comment"] [data-slot="line-comment-actions"] {
  94. display: flex;
  95. align-items: center;
  96. gap: 8px;
  97. }
  98. [data-component="line-comment"] [data-slot="line-comment-editor-label"] {
  99. margin-right: auto;
  100. }