shui.css 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. html * {
  2. border-color: hsl(var(--border));
  3. }
  4. html[data-theme=light] {
  5. --accent: var(--rx-gray-12-hsl);
  6. --accent-foreground: var(--rx-gray-02-hsl);
  7. --input: var(--rx-gray-03-hsl);
  8. --secondary: 240 4.8% 95.9%;
  9. }
  10. html[data-theme=dark] {
  11. --accent: var(--rx-gray-12-hsl);
  12. --accent-foreground: var(--rx-gray-02-hsl);
  13. --primary-foreground: 0 0% 22%;
  14. --background: 0 0% 11%;
  15. --foreground: 0 0% 95%;
  16. --card: 0 0% 11%;
  17. --card-foreground: 0 0% 95%;
  18. --secondary: 0 0% 20%;
  19. --secondary-foreground: 0 0% 98%;
  20. --border: 0 0% 16%;
  21. --muted: 0 0% 15%;
  22. --popover: 0 0% 7%;
  23. --popover-foreground: 0 0 95%;
  24. --input: 0 0% 25%;
  25. }
  26. html {
  27. .ui__dropdown-menu-content,
  28. .ui__dropdown-menu-sub-content,
  29. .ui__context-menu-content,
  30. .ui__select-content {
  31. --accent: var(--rx-gray-04-hsl);
  32. --accent-foreground: var(--rx-gray-12-hsl);
  33. --muted: var(--rx-gray-05-hsl);
  34. }
  35. .ui__calendar {
  36. --accent: var(--rx-gray-04-hsl);
  37. --accent-foreground: var(--rx-gray-12-hsl);
  38. }
  39. &:not([data-color=logseq]) {
  40. .ui__dropdown-menu-item,
  41. div[data-radix-popper-content-wrapper] div[data-radix-collection-item] {
  42. &:focus, &.is-active {
  43. background-color: var(--lx-gray-04, hsl(var(--accent)));
  44. }
  45. }
  46. .ui__dropdown-menu-content.has-search-key {
  47. > .head:focus-within + div[data-radix-collection-item] {
  48. background-color: var(--lx-gray-04, hsl(var(--accent)));
  49. }
  50. }
  51. div[data-radix-popper-content-wrapper] div[role=menu],
  52. .menu-links-wrapper,
  53. .menu-links-outer,
  54. .absolute-modal[data-modal-name] {
  55. background-color: var(--lx-popover-bg, var(--lx-gray-01, hsl(var(--popover))));
  56. }
  57. }
  58. &[data-color=logseq] {
  59. .references-blocks-item {
  60. --lx-bg-override: var(--rx-gray-03-alpha);
  61. }
  62. .block-children-left-border:hover {
  63. --ls-block-left-color: var(--rx-logseq-11);
  64. }
  65. }
  66. &[data-color=none] {
  67. --ls-block-bullet-color: var(--rx-gray-08);
  68. --ls-block-bullet-active-color: var(--rx-gray-12);
  69. ::selection {
  70. @apply bg-primary/20;
  71. }
  72. #ui__ac-inner {
  73. }
  74. .cp__cmdk {
  75. --lx-gray-07: var(--rx-gray-07);
  76. }
  77. .ui__toggle {
  78. &-background-off {
  79. @apply bg-gray-08;
  80. .switcher {
  81. @apply bg-gray-10;
  82. }
  83. }
  84. &-background-on {
  85. .switcher {
  86. @apply bg-gray-03;
  87. }
  88. }
  89. }
  90. .tl-container {
  91. --ls-primary-background-color: hsl(var(--background));
  92. --ls-secondary-background-color: var(--rx-gray-01);
  93. --ls-tertiary-background-color: var(--rx-gray-03);
  94. --ls-quaternary-background-color: var(--rx-gray-05);
  95. }
  96. }
  97. }
  98. html[data-theme=light] {
  99. &[data-color=logseq] {
  100. .references-blocks-item {
  101. --lx-bg-override: var(--rx-gray-03-alpha);
  102. }
  103. }
  104. .extensions__pdf-container {
  105. --lx-pdf-container-dark-bg: var(--lx-gray-11, #042f3c);
  106. }
  107. }
  108. html[data-theme=dark] {
  109. background-color: #161616;
  110. &[data-color=logseq] {
  111. @apply bg-[#002b36];
  112. .ui__modal-panel {
  113. @apply border-accent-01;
  114. }
  115. .tippy-tooltip {
  116. @apply border-accent-02;
  117. }
  118. .references-blocks-item {
  119. background-color: var(--lx-gray-03, var(--ls-secondary-background-color));
  120. }
  121. .cp__right-sidebar-inner {
  122. .references-blocks-item {
  123. background-color: var(--lx-gray-04, var(--ls-tertiary-background-color));
  124. }
  125. }
  126. .cp__themes-installed {
  127. .it.is-active, .it:hover {
  128. @apply bg-accent-01;
  129. }
  130. }
  131. .ui__button {
  132. &.as-outline {
  133. --accent: 192 100% 12%;
  134. }
  135. }
  136. .ui__dropdown-menu-content,
  137. .ui__context-menu-content,
  138. .ui__select-content {
  139. --accent: 190 100% 15%;
  140. --muted: 192 100% 13%;
  141. }
  142. .ui__button {
  143. &.as-ghost {
  144. @apply hover:bg-accent-01;
  145. }
  146. }
  147. .menu-separator {
  148. @apply opacity-20;
  149. }
  150. .ui__calendar {
  151. --accent: 196 100% 15%;
  152. }
  153. .rc-datepicker {
  154. --accent: 200 97% 37%;
  155. }
  156. .cp__cmdk {
  157. .border-gray-06,
  158. .border-gray-07 {
  159. border-color: var(--ls-border-color, var(--lx-gray-06));
  160. opacity: .6;
  161. }
  162. > .hints {
  163. @apply border-accent-01 bg-gray-02;
  164. }
  165. }
  166. .tl-button {
  167. &:hover {
  168. @apply bg-accent-02;
  169. }
  170. }
  171. .cp__header {
  172. > .r > div:not(.ui__dropdown-trigger) a.button, button.button {
  173. @apply opacity-60 hover:opacity-90;
  174. }
  175. }
  176. .form-input {
  177. @apply border-accent-01;
  178. }
  179. }
  180. }
  181. .ui__dialog-overlay, .ui__alert-dialog-overlay,
  182. .ui__dialog-content, .ui__alert-dialog-content,
  183. .ui__dropdown-menu-content, .ui__select-content {
  184. &.z-50 {
  185. @apply z-[999];
  186. }
  187. }
  188. div[data-radix-popper-content-wrapper] {
  189. @apply !z-[999];
  190. }
  191. .ui__dialog-overlay {
  192. &[data-align=start],
  193. &[data-align=top] {
  194. @apply !items-start;
  195. .ui__dialog-content {
  196. @apply top-20;
  197. }
  198. }
  199. }
  200. .ui__dialog-content {
  201. @apply outline-none;
  202. &[data-auto-width] {
  203. @apply max-w-[90vw] w-max sm:max-w-[960px];
  204. }
  205. &[data-close-btn=false] {
  206. .ui__dialog-close {
  207. @apply hidden;
  208. }
  209. }
  210. }
  211. .ui__button-shortcut-key {
  212. @apply text-xs font-normal h-5 w-5 flex items-center justify-center rounded bg-gray-06-alpha;
  213. &:first-of-type {
  214. @apply ml-2;
  215. }
  216. }
  217. .ui__list-item-highlighted-span {
  218. background-color: or(--lx-accent-06, --color-level-4);
  219. }
  220. .dark .ui__list-item-highlighted-span {
  221. background-color: or(--lx-accent-08-alpha, --color-level-4);
  222. }
  223. .ui__dropdown-menu-content {
  224. @apply overflow-y-auto;
  225. &[data-side=top] {
  226. max-height: calc(var(--radix-dropdown-menu-content-available-height) - 40px);
  227. }
  228. &[data-side=bottom] {
  229. max-height: calc(var(--radix-dropdown-menu-content-available-height) - 20px);
  230. }
  231. &.text-popover-foreground {
  232. color: inherit;
  233. }
  234. }
  235. .ui__popover-content {
  236. @apply overflow-y-auto;
  237. &[data-side=top] {
  238. max-height: calc(var(--radix-popover-content-available-height) - 40px);
  239. }
  240. &[data-side=bottom] {
  241. max-height: calc(var(--radix-popover-content-available-height) - 20px);
  242. }
  243. }
  244. .ui__popover-content {
  245. @apply !pointer-events-auto;
  246. }
  247. .ui__multi-select-content {
  248. @apply relative;
  249. > .head {
  250. @apply sticky top-0 z-10;
  251. }
  252. .search-input {
  253. > .ui__input {
  254. @apply rounded-[1px] h-8;
  255. }
  256. }
  257. &:has([data-radix-collection-item]) {
  258. > .head {
  259. @apply mb-1.5;
  260. }
  261. }
  262. }
  263. .popper-arrow {
  264. fill: white;
  265. filter: drop-shadow(0 0 3px var(--lx-gray-12));
  266. clip-path: inset(0 -10px -10px -10px);
  267. }
  268. .dark-theme {
  269. .popper-arrow {
  270. /* FIXME: set the best color for different themes */
  271. fill: none;
  272. }
  273. }