shui.css 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  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. }
  139. .ui__button {
  140. &.as-ghost {
  141. @apply hover:bg-accent-01;
  142. }
  143. }
  144. .menu-separator {
  145. @apply opacity-20;
  146. }
  147. .ui__calendar {
  148. --accent: 196 100% 15%;
  149. }
  150. .rc-datepicker {
  151. --accent: 200 97% 37%;
  152. }
  153. .cp__cmdk {
  154. .border-gray-06,
  155. .border-gray-07 {
  156. border-color: var(--ls-border-color, var(--lx-gray-06));
  157. opacity: .6;
  158. }
  159. > .hints {
  160. @apply border-accent-01 bg-gray-02;
  161. }
  162. }
  163. .tl-button {
  164. &:hover {
  165. @apply bg-accent-02;
  166. }
  167. }
  168. .cp__header {
  169. > .r > div:not(.ui__dropdown-trigger) a.button, button.button {
  170. @apply opacity-60 hover:opacity-90;
  171. }
  172. }
  173. .form-input {
  174. @apply border-accent-01;
  175. }
  176. }
  177. }
  178. .ui__dialog-overlay, .ui__alert-dialog-overlay,
  179. .ui__dialog-content, .ui__alert-dialog-content,
  180. .ui__dropdown-menu-content, .ui__select-content {
  181. &.z-50 {
  182. @apply z-[999];
  183. }
  184. }
  185. div[data-radix-popper-content-wrapper] {
  186. @apply !z-[999];
  187. }
  188. .ui__dialog-overlay {
  189. &[data-align=start],
  190. &[data-align=top] {
  191. @apply !items-start;
  192. .ui__dialog-content {
  193. @apply top-20;
  194. }
  195. }
  196. }
  197. .ui__dialog-content {
  198. @apply outline-none;
  199. &[data-auto-width] {
  200. @apply max-w-[90vw] w-max sm:max-w-[960px];
  201. }
  202. &[data-close-btn=false] {
  203. .ui__dialog-close {
  204. @apply hidden;
  205. }
  206. }
  207. }
  208. .ui__alert-dialog-content {
  209. &[data-mode=confirm] {
  210. .ui__alert-dialog-footer {
  211. @apply flex justify-between font-normal items-center select-none;
  212. }
  213. }
  214. }
  215. .ui__button-shortcut-key {
  216. @apply text-xs font-normal h-5 w-5 flex items-center justify-center rounded bg-gray-06-alpha;
  217. &:first-of-type {
  218. @apply ml-2;
  219. }
  220. }
  221. .ui__list-item-highlighted-span {
  222. background-color: or(--lx-accent-06, --color-level-4);
  223. }
  224. .dark .ui__list-item-highlighted-span {
  225. background-color: or(--lx-accent-08-alpha, --color-level-4);
  226. }
  227. .ui__dropdown-menu-content, div[data-radix-menu-content] {
  228. @apply overflow-y-auto;
  229. &[data-side=top] {
  230. max-height: calc(var(--radix-dropdown-menu-content-available-height) - 40px);
  231. }
  232. &[data-side=bottom] {
  233. max-height: calc(var(--radix-dropdown-menu-content-available-height) - 20px);
  234. }
  235. &.text-popover-foreground {
  236. color: inherit;
  237. }
  238. }
  239. .ui__popover-content {
  240. @apply overflow-y-auto;
  241. &[data-side=top] {
  242. max-height: calc(var(--radix-popover-content-available-height) - 40px);
  243. }
  244. &[data-side=bottom] {
  245. max-height: calc(var(--radix-popover-content-available-height) - 20px);
  246. }
  247. }
  248. .ui__popover-content {
  249. @apply !pointer-events-auto;
  250. }
  251. .ui__multi-select-content {
  252. @apply relative;
  253. > .head {
  254. @apply sticky top-0 z-10;
  255. }
  256. .search-input {
  257. > .ui__input {
  258. @apply rounded-[1px] h-8;
  259. }
  260. }
  261. &:has([data-radix-collection-item]) {
  262. > .head {
  263. @apply mb-1.5;
  264. }
  265. }
  266. }
  267. .ui__calendar {
  268. .rdp-caption_dropdowns {
  269. @apply flex items-center justify-center relative border rounded opacity-80;
  270. .rdp-vhidden {
  271. @apply hidden;
  272. }
  273. .rdp-dropdown_month,
  274. .rdp-dropdown_year {
  275. @apply relative pr-3 mr-3;
  276. select {
  277. @apply absolute px-2 py-0 border left-0 z-[2] opacity-0 bg-none;
  278. }
  279. > .text-sm {
  280. @apply w-full z-[1];
  281. svg {
  282. @apply absolute right-0 top-[6px];
  283. }
  284. }
  285. }
  286. .rdp-dropdown_month {
  287. @apply ml-4;
  288. }
  289. & + div {
  290. @apply absolute -right-1 flex gap-2;
  291. button[name=previous-month] {
  292. @apply relative;
  293. }
  294. button[name=next-month] {
  295. @apply relative;
  296. }
  297. }
  298. .months-years-nav {
  299. @apply flex items-center relative left-0 pr-0 py-[1px] font-[500];
  300. select {
  301. @apply pl-2.5 pr-1 py-0 border-none bg-transparent bg-none text-center overflow-hidden w-auto;
  302. &[data-month="0"], &[data-month="1"] {
  303. @apply w-[86px];
  304. }
  305. &[data-month="2"], &[data-month="7"] {
  306. @apply w-[74px];
  307. }
  308. &[data-month="3"], &[data-month="4"],
  309. &[data-month="5"], &[data-month="6"] {
  310. @apply px-0 w-[60px];
  311. }
  312. }
  313. input {
  314. @apply border-none ml-0 mr-2 bg-transparent;
  315. }
  316. }
  317. }
  318. .rdp-caption_start {
  319. > div {
  320. @apply justify-start;
  321. }
  322. }
  323. .del-date-btn {
  324. @apply absolute right-[9px] top-[19px] px-1 opacity-70 hover:opacity-100
  325. active:opacity-80 hover:text-red-rx-09 rounded-md;
  326. }
  327. &.has-del-btn {
  328. .rdp-caption_dropdowns {
  329. & + div {
  330. @apply right-5;
  331. }
  332. }
  333. }
  334. input[type=number] {
  335. appearance: initial;
  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. }