menu-v2.css 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. [data-component="menu-v2-content"] {
  2. box-sizing: border-box;
  3. display: flex;
  4. flex-direction: column;
  5. align-items: stretch;
  6. padding: 2px;
  7. min-width: 160px;
  8. background: var(--background-bg-layer-01);
  9. border-radius: 6px;
  10. box-shadow: var(--elevation-floating);
  11. outline: none;
  12. font-family: var(--font-family-sans), 'Inter', system-ui, sans-serif;
  13. -webkit-font-smoothing: antialiased;
  14. -moz-osx-font-smoothing: grayscale;
  15. text-rendering: geometricPrecision;
  16. transform-origin: var(--kb-menu-content-transform-origin);
  17. animation: menu-v2-in 120ms ease-out;
  18. &:focus-visible {
  19. outline: none;
  20. }
  21. }
  22. [data-component="menu-v2-item"] {
  23. --menu-v2-fg: var(--text-text-base);
  24. --menu-v2-fg-muted: var(--text-text-faint);
  25. --menu-v2-fg-subtle: var(--text-text-muted);
  26. --menu-v2-icon: var(--icon-icon-base);
  27. --menu-v2-accent: var(--text-text-accent);
  28. --menu-v2-badge-bg: var(--background-bg-layer-02);
  29. --menu-v2-badge-border: var(--border-border-base);
  30. --menu-v2-hover: var(--overlay-simple-overlay-hover);
  31. -webkit-font-smoothing: antialiased;
  32. -moz-osx-font-smoothing: grayscale;
  33. text-rendering: geometricPrecision;
  34. box-sizing: border-box;
  35. display: flex;
  36. flex-direction: row;
  37. align-items: center;
  38. gap: 8px;
  39. height: 28px;
  40. padding: 0 12px;
  41. background: transparent;
  42. border-radius: 4px;
  43. outline: none;
  44. cursor: default;
  45. user-select: none;
  46. font-family: var(--font-family-sans), 'Inter', system-ui, sans-serif;
  47. font-variation-settings: 'slnt' 0;
  48. font-variant-numeric: tabular-nums;
  49. color: var(--menu-v2-fg);
  50. [data-slot="menu-v2-item-content"] {
  51. display: flex;
  52. flex: 1 1 auto;
  53. flex-direction: row;
  54. align-items: center;
  55. gap: 8px;
  56. min-width: 0;
  57. font-size: 13px;
  58. font-weight: 440;
  59. line-height: 100%;
  60. letter-spacing: -0.04px;
  61. color: var(--menu-v2-fg);
  62. }
  63. [data-slot="menu-v2-item-shortcut"] {
  64. display: inline-flex;
  65. align-items: center;
  66. flex: none;
  67. height: 11px;
  68. font-size: 11px;
  69. font-weight: 530;
  70. line-height: 100%;
  71. letter-spacing: 0.05px;
  72. color: var(--menu-v2-fg-muted);
  73. white-space: nowrap;
  74. }
  75. [data-slot="menu-v2-item-badge"] {
  76. box-sizing: border-box;
  77. display: inline-flex;
  78. flex-direction: row;
  79. align-items: center;
  80. justify-content: center;
  81. flex: none;
  82. gap: 4px;
  83. height: 16px;
  84. padding: 0 4px;
  85. background: var(--menu-v2-badge-bg);
  86. border: 0.5px solid var(--menu-v2-badge-border);
  87. border-radius: 2px;
  88. font-size: 11px;
  89. font-weight: 530;
  90. line-height: 100%;
  91. letter-spacing: 0.05px;
  92. color: var(--menu-v2-fg-subtle);
  93. white-space: nowrap;
  94. }
  95. [data-slot="menu-v2-item-indicator"] {
  96. display: inline-flex;
  97. align-items: center;
  98. justify-content: center;
  99. flex: none;
  100. width: 16px;
  101. height: 16px;
  102. color: var(--menu-v2-icon);
  103. }
  104. [data-slot="menu-v2-item-indicator"]:not([data-checked]) > svg {
  105. visibility: hidden;
  106. }
  107. [data-slot="menu-v2-item-chevron"] {
  108. flex: none;
  109. width: 16px;
  110. height: 16px;
  111. color: var(--menu-v2-fg-muted);
  112. }
  113. &[data-highlighted] {
  114. background: var(--menu-v2-hover);
  115. }
  116. &[data-checked] [data-slot="menu-v2-item-content"] {
  117. font-weight: 530;
  118. color: var(--menu-v2-accent);
  119. }
  120. &[data-checked] [data-slot="menu-v2-item-indicator"] {
  121. color: var(--menu-v2-accent);
  122. }
  123. &[data-disabled] {
  124. pointer-events: none;
  125. opacity: 0.5;
  126. }
  127. }
  128. [data-slot="menu-v2-separator"] {
  129. height: 1px;
  130. width: calc(100% + 4px);
  131. margin: 2px -2px;
  132. background: var(--border-border-muted);
  133. border: none;
  134. }
  135. [data-slot="menu-v2-group-label"] {
  136. box-sizing: border-box;
  137. display: flex;
  138. align-items: center;
  139. height: 28px;
  140. padding: 0 12px;
  141. font-family: var(--font-family-sans), 'Inter', system-ui, sans-serif;
  142. font-size: 11px;
  143. font-weight: 530;
  144. line-height: 100%;
  145. letter-spacing: 0.05px;
  146. color: var(--text-text-faint);
  147. user-select: none;
  148. font-variant-numeric: tabular-nums;
  149. }
  150. @keyframes menu-v2-in {
  151. from {
  152. opacity: 0;
  153. transform: scale(0.96);
  154. }
  155. to {
  156. opacity: 1;
  157. transform: scale(1);
  158. }
  159. }