shui.css 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  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. div[data-radix-menu-content],
  28. .ui__select-content {
  29. --accent: var(--rx-gray-04-hsl);
  30. --accent-foreground: var(--rx-gray-12-hsl);
  31. --muted: var(--rx-gray-05-hsl);
  32. }
  33. .ui__calendar {
  34. --accent: var(--rx-gray-04-hsl);
  35. --accent-foreground: var(--rx-gray-12-hsl);
  36. }
  37. &:not([data-color=logseq]) {
  38. .ui__dropdown-menu-item,
  39. div[data-radix-popper-content-wrapper] div[data-radix-collection-item] {
  40. &:focus, &.is-active {
  41. background-color: var(--lx-gray-04, hsl(var(--accent)));
  42. }
  43. }
  44. .ui__dropdown-menu-content.has-search-key {
  45. > .head:focus-within + div[data-radix-collection-item] {
  46. background-color: var(--lx-gray-04, hsl(var(--accent)));
  47. }
  48. }
  49. div[data-radix-popper-content-wrapper] div[role=menu],
  50. .menu-links-wrapper,
  51. .menu-links-outer,
  52. .absolute-modal[data-modal-name] {
  53. background-color: var(--lx-popover-bg, var(--lx-gray-01, hsl(var(--popover))));
  54. }
  55. }
  56. &[data-color=logseq] {
  57. .references-blocks-item {
  58. --lx-bg-override: var(--rx-gray-03-alpha);
  59. }
  60. .block-children-left-border:hover {
  61. --ls-block-left-color: var(--rx-logseq-11);
  62. }
  63. }
  64. &[data-color=none] {
  65. --ls-block-bullet-color: var(--rx-gray-08);
  66. --ls-block-bullet-active-color: var(--rx-gray-12);
  67. ::selection {
  68. @apply bg-primary/20;
  69. }
  70. #ui__ac-inner {
  71. }
  72. .cp__cmdk {
  73. --lx-gray-07: var(--rx-gray-07);
  74. }
  75. .ui__toggle {
  76. &-background-off {
  77. @apply bg-gray-08;
  78. .switcher {
  79. @apply bg-gray-10;
  80. }
  81. }
  82. &-background-on {
  83. .switcher {
  84. @apply bg-gray-03;
  85. }
  86. }
  87. }
  88. .tl-container {
  89. --ls-primary-background-color: hsl(var(--background));
  90. --ls-secondary-background-color: var(--rx-gray-01);
  91. --ls-tertiary-background-color: var(--rx-gray-03);
  92. --ls-quaternary-background-color: var(--rx-gray-05);
  93. }
  94. }
  95. }
  96. html[data-theme=light] {
  97. &[data-color=logseq] {
  98. .references-blocks-item {
  99. --lx-bg-override: var(--rx-gray-03-alpha);
  100. }
  101. }
  102. .extensions__pdf-container {
  103. --lx-pdf-container-dark-bg: var(--lx-gray-11, #042f3c);
  104. }
  105. }
  106. html[data-theme=dark] {
  107. background-color: #161616;
  108. &[data-color=logseq] {
  109. @apply bg-[#002b36];
  110. .ui__modal-panel {
  111. @apply border-accent-01;
  112. }
  113. .tippy-tooltip {
  114. @apply border-accent-02;
  115. }
  116. .references-blocks-item {
  117. background-color: var(--lx-gray-03, var(--ls-secondary-background-color));
  118. }
  119. .cp__right-sidebar-inner {
  120. .references-blocks-item {
  121. background-color: var(--lx-gray-04, var(--ls-tertiary-background-color));
  122. }
  123. }
  124. .cp__themes-installed {
  125. .it.is-active, .it:hover {
  126. @apply bg-accent-01;
  127. }
  128. }
  129. .ui__button {
  130. &.as-outline {
  131. --accent: 192 100% 12%;
  132. }
  133. }
  134. div[data-radix-menu-content],
  135. .ui__select-content {
  136. --accent: 190 100% 15%;
  137. --muted: 192 100% 13%;
  138. --secondary-foreground: 0 0% 82%;
  139. }
  140. .ui__button {
  141. &.as-ghost {
  142. @apply hover:bg-accent-01;
  143. }
  144. }
  145. .menu-separator {
  146. @apply opacity-20;
  147. }
  148. .ui__calendar {
  149. --accent: 196 100% 15%;
  150. }
  151. .rc-datepicker {
  152. --accent: 200 97% 37%;
  153. }
  154. .cp__cmdk {
  155. .border-gray-06,
  156. .border-gray-07 {
  157. border-color: var(--ls-border-color, var(--lx-gray-06));
  158. opacity: .6;
  159. }
  160. > .hints {
  161. @apply border-accent-01 bg-gray-02;
  162. }
  163. }
  164. .tl-button {
  165. &:hover {
  166. @apply bg-accent-02;
  167. }
  168. }
  169. .cp__header {
  170. > .r > div:not(.ui__dropdown-trigger) a.button, button.button,
  171. .ui__button.as-ghost {
  172. @apply opacity-60 hover:opacity-90;
  173. }
  174. }
  175. .form-input {
  176. @apply border-accent-01;
  177. }
  178. }
  179. }
  180. .ui__dialog-overlay, .ui__alert-dialog-overlay,
  181. .ui__dialog-content, .ui__alert-dialog-content,
  182. .ui__dropdown-menu-content, .ui__select-content {
  183. &.z-50 {
  184. @apply z-[999];
  185. }
  186. }
  187. div[data-radix-popper-content-wrapper] {
  188. @apply !z-[999];
  189. &:has(> .repos-list) {
  190. @apply !z-[var(--ls-z-index-level-5)];
  191. }
  192. }
  193. .ui__dialog-overlay {
  194. &[data-align=start],
  195. &[data-align=top] {
  196. @apply !items-start;
  197. .ui__dialog-content {
  198. @apply top-20;
  199. }
  200. }
  201. }
  202. .ui__dialog-content {
  203. @apply outline-none m-4;
  204. &[data-auto-width] {
  205. @apply max-w-[90vw] w-max sm:max-w-[960px];
  206. }
  207. &[data-close-btn=false] {
  208. .ui__dialog-close {
  209. @apply hidden;
  210. }
  211. }
  212. }
  213. .ui__alert-dialog-content {
  214. &[data-mode=confirm] {
  215. .ui__alert-dialog-footer {
  216. @apply flex justify-between font-normal items-center select-none;
  217. }
  218. }
  219. }
  220. .ui__button-shortcut-key {
  221. @apply text-xs font-normal h-5 w-5 flex items-center justify-center rounded bg-gray-06-alpha;
  222. &:first-of-type {
  223. @apply ml-2;
  224. }
  225. }
  226. .ui__list-item-highlighted-span {
  227. background-color: or(--lx-accent-06, --color-level-4);
  228. }
  229. .dark .ui__list-item-highlighted-span {
  230. background-color: or(--lx-accent-08-alpha, --color-level-4);
  231. }
  232. .ui__dropdown-menu-content, div[data-radix-menu-content],
  233. .ui__select-content {
  234. @apply overflow-y-auto;
  235. &[data-side=top] {
  236. max-height: calc(var(--radix-dropdown-menu-content-available-height) - 20px);
  237. }
  238. &[data-side=bottom] {
  239. max-height: calc(var(--radix-dropdown-menu-content-available-height) - 10px);
  240. }
  241. &.text-popover-foreground {
  242. color: inherit;
  243. }
  244. }
  245. .ui__popover-content {
  246. @apply overflow-y-auto;
  247. &[data-side=top] {
  248. max-height: calc(var(--radix-popover-content-available-height) - 40px);
  249. }
  250. &[data-side=bottom] {
  251. max-height: calc(var(--radix-popover-content-available-height) - 20px);
  252. }
  253. }
  254. .ui__popover-content {
  255. @apply !pointer-events-auto;
  256. }
  257. .ui__multi-select-content {
  258. @apply relative;
  259. > .head {
  260. @apply sticky top-0 z-10;
  261. }
  262. .search-input {
  263. > .ui__input {
  264. @apply rounded-[1px] h-8;
  265. }
  266. }
  267. &:has([data-radix-collection-item]) {
  268. > .head {
  269. @apply mb-1.5;
  270. }
  271. }
  272. }
  273. .ui__calendar {
  274. .rdp-caption_dropdowns {
  275. @apply flex items-center justify-center relative rounded opacity-80;
  276. .rdp-vhidden {
  277. @apply hidden;
  278. }
  279. .rdp-dropdown_month,
  280. .rdp-dropdown_year {
  281. @apply relative pr-3 mr-3;
  282. select {
  283. @apply absolute px-2 py-0 border left-0 z-[2] opacity-0 bg-none;
  284. }
  285. > .text-sm {
  286. @apply w-full z-[1];
  287. svg {
  288. @apply absolute right-0 top-[6px];
  289. }
  290. }
  291. }
  292. .rdp-dropdown_month {
  293. @apply ml-4;
  294. }
  295. & + div {
  296. @apply absolute -right-1 flex gap-2;
  297. button[name=previous-month] {
  298. @apply relative;
  299. svg {
  300. width: 14px;
  301. height: 14px;
  302. }
  303. }
  304. button[name=next-month] {
  305. @apply relative;
  306. svg {
  307. width: 14px;
  308. height: 14px;
  309. }
  310. }
  311. }
  312. }
  313. .rdp-caption_start {
  314. > div {
  315. @apply justify-start;
  316. }
  317. }
  318. .del-date-btn {
  319. @apply absolute right-[4px] top-[17px] px-1 opacity-70 hover:opacity-100
  320. active:opacity-80 hover:text-red-rx-09 rounded-md !h-6 !w-6;
  321. }
  322. &.has-del-btn {
  323. .rdp-caption_dropdowns {
  324. & + div {
  325. @apply right-5;
  326. }
  327. }
  328. }
  329. input[type=number] {
  330. appearance: initial;
  331. }
  332. .rdp-button {
  333. &[name=previous-month], &[name=next-month] {
  334. @apply !h-6 !w-6;
  335. }
  336. }
  337. }
  338. .popper-arrow {
  339. fill: white;
  340. filter: drop-shadow(0 0 3px var(--lx-gray-12));
  341. clip-path: inset(0 -10px -10px -10px);
  342. }
  343. .dark-theme {
  344. .popper-arrow {
  345. /* FIXME: set the best color for different themes */
  346. fill: none;
  347. }
  348. }