styles.css 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635
  1. .logseq-tldraw {
  2. --color-panel: var(--ls-tertiary-background-color);
  3. --color-panel-inverted: var(--ls-secondary-text-color);
  4. --color-text: var(--ls-primary-text-color);
  5. --color-text-inverted: var(--ls-tertiary-background-color);
  6. --color-hover: var(--ls-secondary-background-color);
  7. --color-selectedStroke: rgb(42, 123, 253);
  8. --color-selectedFill: #4285f4;
  9. --color-selectedContrast: #fff;
  10. --shadow-small: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  11. --shadow-medium: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  12. --shadow-large: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  13. }
  14. .logseq-tldraw-wrapper {
  15. @apply flex flex-col w-full h-full relative;
  16. }
  17. .tl-toolbar {
  18. @apply absolute top-0 w-full flex;
  19. grid-row: 1;
  20. align-items: center;
  21. padding: 8px;
  22. color: black;
  23. z-index: 100000;
  24. user-select: none;
  25. background: white;
  26. border-bottom: 1px solid black;
  27. font-size: inherit;
  28. }
  29. .tl-action-bar {
  30. @apply absolute bottom-0 flex border-0;
  31. border-radius: 12px 12px 0 0;
  32. left: 53px;
  33. align-items: center;
  34. gap: 12px;
  35. padding: 8px;
  36. color: black;
  37. z-index: 100000;
  38. user-select: none;
  39. background: var(--ls-primary-background-color);
  40. box-shadow: var(--shadow-medium);
  41. > button {
  42. @apply text-sm rounded border-0 inline-flex items-center justify-center;
  43. height: 32px;
  44. padding: 0 8px;
  45. color: var(--ls-primary-text-color);
  46. font-family: var(--ls-font-family);
  47. background: none;
  48. cursor: pointer;
  49. opacity: 1;
  50. white-space: nowrap;
  51. &:hover {
  52. background-color: var(--color-hover);
  53. }
  54. }
  55. }
  56. .tl-zoom-menu-dropdown-menu-button {
  57. opacity: 100%;
  58. background-color: var(--color-panel);
  59. border-radius: 6px;
  60. padding: 5px;
  61. box-shadow: 0 10px 38px -10px rgba(22, 23, 24, 0.35), 0 10px 20px -15px rgba(22, 23, 24, 0.2);
  62. > span svg {
  63. fill: var(--color-panel) !important;
  64. }
  65. }
  66. .tl-zoom-menu-dropdown-item {
  67. min-width: 220px;
  68. all: unset;
  69. font-size: 13px;
  70. line-height: 1;
  71. color: black;
  72. border-radius: 3px;
  73. display: flex;
  74. align-items: center;
  75. height: 25px;
  76. padding: 0 5px;
  77. position: relative;
  78. user-select: none;
  79. color: var(--color-text);
  80. &:hover {
  81. background-color: var(--color-hover);
  82. }
  83. }
  84. .tl-zoom-menu-right-slot {
  85. margin-left: auto;
  86. padding-left: 20px;
  87. color: var(--color-text);
  88. }
  89. .tl-contextbar {
  90. @apply relative flex text-sm;
  91. pointer-events: all;
  92. position: relative;
  93. background-color: #fff;
  94. color: #a4b5b6;
  95. padding: 8px 12px;
  96. border-radius: 8px;
  97. white-space: nowrap;
  98. gap: 12px;
  99. align-items: stretch;
  100. will-change: transform, contents;
  101. box-shadow: var(--shadow-medium);
  102. z-index: 1000;
  103. label {
  104. font-family: var(--ls-font-family);
  105. font-size: 10px;
  106. }
  107. .input {
  108. display: flex;
  109. flex-direction: column;
  110. gap: 4px;
  111. }
  112. .number-input {
  113. width: 44px;
  114. height: 24px;
  115. padding: 2px;
  116. }
  117. .color-input-wrapper {
  118. overflow: hidden;
  119. height: 18px;
  120. width: 46px;
  121. border-radius: 2px;
  122. margin: 2px;
  123. box-shadow: 0 0 0 2px var(--ls-tertiary-background-color);
  124. }
  125. .color-input {
  126. transform: translate(-4px, -4px) scale(1.5);
  127. }
  128. .switch-input-root {
  129. all: unset;
  130. width: 36px;
  131. height: 20px;
  132. background-color: rgba(0, 0, 0, 0.44);
  133. position: relative;
  134. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  135. border-radius: 9999px;
  136. &[data-state='checked'] {
  137. background: #8ec2c2;
  138. }
  139. }
  140. .switch-input-thumb {
  141. display: block;
  142. width: 16px;
  143. height: 16px;
  144. background-color: white;
  145. border-radius: 9999px;
  146. transition: transform 100ms ease 0s;
  147. transform: translateX(3px);
  148. will-change: transform;
  149. }
  150. &[data-state='checked'] {
  151. transform: translateX(17px);
  152. }
  153. .tl-text-input {
  154. height: 24px;
  155. padding: 0;
  156. background: none;
  157. border-radius: 2px;
  158. &:focus {
  159. outline: none;
  160. }
  161. }
  162. }
  163. .tl-statusbar {
  164. @apply absolute flex items-center w-full bottom-0;
  165. font-family: monospace;
  166. font-size: 10px;
  167. grid-row: 3;
  168. padding: 8px;
  169. color: black;
  170. z-index: 100000;
  171. user-select: none;
  172. background: white;
  173. border-top: 1px solid black;
  174. flex-shrink: 0;
  175. height: 32px;
  176. }
  177. .tl-primary-tools {
  178. @apply absolute h-full top-0 flex items-center justify-center;
  179. right: 30px;
  180. pointer-events: none;
  181. gap: 8px;
  182. z-index: 10000;
  183. flex-flow: column;
  184. border-radius: 8px;
  185. padding: 8px;
  186. .tl-button {
  187. @apply relative flex items-center justify-center text-base rounded border-0;
  188. height: 28px;
  189. width: 28px;
  190. font-family: var(--ls-font-family);
  191. background: none;
  192. cursor: pointer;
  193. color: var(--ls-primary-text-color);
  194. &:hover {
  195. background-color: var(--color-hover);
  196. }
  197. &[data-selected='true'] {
  198. background-color: var(--color-selectedFill);
  199. color: var(--color-selectedContrast);
  200. }
  201. }
  202. }
  203. .tl-tools-floating-panel {
  204. @apply flex;
  205. flex-flow: column;
  206. border-radius: 8px;
  207. padding: 4px;
  208. gap: 8px;
  209. background-color: var(--color-panel);
  210. box-shadow: var(--shadow-medium);
  211. pointer-events: all;
  212. }
  213. .tl-geometry-tools-pane-anchor {
  214. @apply relative;
  215. }
  216. .tl-geometry-tools-pane {
  217. @apply absolute flex flex-col items-center justify-center;
  218. right: 100%;
  219. top: calc(50% - 52px);
  220. background-color: var(--ls-secondary-background-color);
  221. border-radius: 8px;
  222. padding: 4px;
  223. gap: 8px;
  224. .tl-button:not([data-selected='true']):hover {
  225. background-color: var(--ls-tertiary-background-color);
  226. }
  227. }
  228. .floating-panel[data-tool-locked='true'] > .tl-button[data-selected='true']::after {
  229. @apply block absolute;
  230. content: '';
  231. height: 6px;
  232. width: 6px;
  233. border: 2px solid var(--color-selectedContrast);
  234. background-color: var(--color-selectedFill);
  235. bottom: -4px;
  236. left: calc(50% - 5px);
  237. border-radius: 100%;
  238. }
  239. .tl-text-shape-wrapper {
  240. @apply absolute p-0 m-0 h-full w-full;
  241. white-space: pre-wrap;
  242. overflow-wrap: break-word;
  243. border: 1px solid transparent;
  244. z-index: 9999;
  245. user-select: none;
  246. min-height: 1;
  247. min-width: 1;
  248. line-height: 1;
  249. outline: 0;
  250. backface-visibility: hidden;
  251. pointer-events: all;
  252. vertical-align: baseline;
  253. -webkit-user-drag: none;
  254. -webkit-user-select: none;
  255. -webkit-touch-callout: none;
  256. }
  257. .tl-text-shape-input {
  258. @apply absolute inset-0 inline-block border-0 overflow-hidden;
  259. z-index: 1;
  260. resize: none;
  261. padding: inherit;
  262. font-family: inherit;
  263. font-size: inherit;
  264. font-variant: inherit;
  265. text-align: inherit;
  266. min-height: inherit;
  267. min-width: inherit;
  268. line-height: inherit;
  269. letter-spacing: inherit;
  270. outline: 0;
  271. white-space: inherit;
  272. overflow-wrap: inherit;
  273. font-weight: inherit;
  274. backface-visibility: hidden;
  275. pointer-events: all;
  276. user-select: text;
  277. -webkit-user-select: text;
  278. }
  279. .tl-stroke-hitarea {
  280. fill: none;
  281. stroke: transparent;
  282. stroke-width: calc(24px * var(--tl-scale));
  283. pointer-events: stroke;
  284. stroke-linecap: round;
  285. stroke-linejoin: round;
  286. }
  287. .tl-text-label-wrapper {
  288. @apply absolute inset-0 flex items-center justify-center;
  289. pointer-events: none;
  290. user-select: none;
  291. font-family: var(--ls-font-family);
  292. }
  293. .tl-text-label-inner-wrapper {
  294. position: absolute;
  295. padding: 4px;
  296. z-index: 1;
  297. min-height: 1px;
  298. min-width: 1px;
  299. line-height: 1;
  300. outline: 0;
  301. font-weight: 500;
  302. text-align: center;
  303. backface-visibility: hidden;
  304. user-select: none;
  305. white-space: pre-wrap;
  306. overflow-wrap: break-word;
  307. }
  308. .tl-text-label-textarea {
  309. @apply absolute inset-0;
  310. z-index: 1;
  311. border: none;
  312. padding: 4px;
  313. resize: none;
  314. text-align: inherit;
  315. min-height: inherit;
  316. min-width: inherit;
  317. line-height: inherit;
  318. letter-spacing: inherit;
  319. outline: 0;
  320. font-weight: inherit;
  321. overflow: hidden;
  322. backface-visibility: hidden;
  323. display: inline-block;
  324. pointer-events: all;
  325. background: var(--colors-boundsBg);
  326. user-select: text;
  327. -webkit-font-smoothing: subpixel-antialiased;
  328. white-space: pre-wrap;
  329. overflow-wrap: break-word;
  330. &:focus {
  331. outline: none;
  332. border: none;
  333. }
  334. }
  335. .tl-preview-minimap {
  336. height: 300px;
  337. width: 400px;
  338. /* Set top to be the viewport minus 10px */
  339. bottom: calc(100vh - 320px);
  340. left: 16px;
  341. position: absolute;
  342. border: 1px solid black;
  343. background-color: #fff;
  344. pointer-events: all;
  345. }
  346. .tl-preview-minimap-toggle {
  347. @apply absolute flex items-center justify-center text-sm;
  348. top: 60px;
  349. right: 50px;
  350. z-index: 1;
  351. width: 32px;
  352. height: 32px;
  353. border-radius: 4px;
  354. box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  355. background: white;
  356. cursor: pointer;
  357. &[data-active='true'] {
  358. background: #eee;
  359. }
  360. }
  361. .tl-quick-search {
  362. width: fit-content;
  363. position: relative;
  364. }
  365. .tl-quick-search-icon {
  366. flex-shrink: 0;
  367. }
  368. .tl-quick-search-indicator {
  369. @apply absolute flex items-center justify-center;
  370. background-color: var(--ls-secondary-background-color);
  371. font-size: 22px;
  372. right: calc(100% + 12px);
  373. height: 34px;
  374. width: 34px;
  375. border-radius: 50%;
  376. top: calc(50% - 17px);
  377. }
  378. .tl-quick-search-input-container {
  379. @apply flex items-center rounded-lg text-base;
  380. background-color: var(--ls-secondary-background-color);
  381. padding: 6px 16px;
  382. box-shadow: var(--shadow-small);
  383. }
  384. .tl-quick-search-input-filter {
  385. @apply flex items-center text-sm;
  386. background: rgba(0, 0, 0, 0.1);
  387. padding: 2px 8px;
  388. white-space: nowrap;
  389. gap: 8px;
  390. border-radius: 5px;
  391. margin-right: 8px;
  392. }
  393. .tl-quick-search-input-filter-remove {
  394. @apply flex items-center justify-center;
  395. width: 16px;
  396. height: 16px;
  397. border-radius: 50%;
  398. background-color: var(--ls-block-bullet-border-color);
  399. &:hover {
  400. background-color: rgba(0, 0, 0, 0.5) !important;
  401. }
  402. > i.ti {
  403. transform: translateY(-0.5px);
  404. }
  405. }
  406. .tl-quick-search-input-sizer {
  407. position: relative;
  408. }
  409. .tl-quick-search-input {
  410. @apply absolute inset-0;
  411. outline: none;
  412. }
  413. .tl-quick-search-input-hidden {
  414. opacity: 0;
  415. min-width: 240px;
  416. min-height: 24px;
  417. }
  418. .tl-quick-search-options {
  419. @apply absolute left-0 w-full flex;
  420. top: calc(100% + 12px);
  421. background-color: var(--ls-primary-background-color);
  422. max-height: 300px;
  423. min-width: 460px;
  424. box-shadow: var(--shadow-large);
  425. overflow-y: auto;
  426. flex-direction: column;
  427. border-radius: 8px;
  428. overscroll-behavior: none;
  429. }
  430. .tl-quick-search-option {
  431. @apply flex text-sm;
  432. flex-flow: column;
  433. padding: 8px 16px;
  434. cursor: pointer;
  435. gap: 0.5em;
  436. &[data-focused='true'] {
  437. background-color: var(--ls-menu-hover-color, #f4f5f7);
  438. }
  439. }
  440. .tl-quick-search-option-row {
  441. display: flex;
  442. gap: 0.5em;
  443. .breadcrumb {
  444. margin: 0;
  445. }
  446. }
  447. .tl-quick-search-option-placeholder {
  448. width: 20px;
  449. flex-shrink: 0;
  450. }
  451. .tl-quick-search-option-breadcrumb {
  452. opacity: 0.5;
  453. }
  454. .tl-logseq-portal-container {
  455. @apply flex flex-col rounded-lg;
  456. width: calc(100% - 2px);
  457. height: calc(100% - 2px);
  458. transform: translate(1px, 1px);
  459. overscroll-behavior: none;
  460. opacity: 1;
  461. }
  462. .tl-logseq-portal-header {
  463. @apply flex items-center w-full;
  464. height: 40px;
  465. flex-shrink: 0;
  466. background: transparent;
  467. color: var(--ls-title-text-color);
  468. border-top-left-radius: 8px;
  469. border-top-right-radius: 8px;
  470. padding: 0 1rem;
  471. gap: 0.5em;
  472. white-space: nowrap;
  473. text-overflow: ellipsis;
  474. overflow: hidden;
  475. .page-ref {
  476. color: var(--ls-title-text-color);
  477. }
  478. }
  479. .tl-type-tag {
  480. @apply flex items-center justify-center rounded text-base;
  481. flex-shrink: 0;
  482. width: 20px;
  483. height: 20px;
  484. line-height: 1;
  485. color: #fff;
  486. background: rgba(0, 0, 0, 0.5);
  487. order: 0;
  488. flex-grow: 0;
  489. }
  490. .tl-html-container > iframe {
  491. @apply h-full w-full !important;
  492. margin: 0;
  493. }
  494. .tl-logseq-cp-container {
  495. @apply h-full w-full rounded-lg;
  496. overscroll-behavior: none;
  497. flex: 1 1 0%;
  498. cursor: default;
  499. }
  500. .tl-highlighted {
  501. @apply p-0 rounded-none;
  502. }
  503. .logseq-img-icon {
  504. width: 20px;
  505. height: 20px;
  506. border-radius: 4px;
  507. box-shadow: 0 8px 12px 0 #85c8c81a, 0 4px 32px 0 #85c8c880;
  508. }
  509. .tl-target-not-found {
  510. @apply flex h-full w-full items-center justify-center;
  511. }
  512. html[data-theme='light'] {
  513. .tl-quick-search-input-filter-remove {
  514. background-color: #7373734d;
  515. }
  516. .tl-type-tag[data-active='true'] {
  517. background: rgba(66, 133, 244, 0.2);
  518. border: 1px solid rgba(42, 123, 253, 0.5);
  519. color: var(--ls-secondary-text-color);
  520. }
  521. .tl-logseq-portal-header {
  522. backdrop-filter: brightness(0.9);
  523. }
  524. }
  525. html[data-theme='dark'] {
  526. .tl-type-tag[data-active='true'] {
  527. background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), #338fff;
  528. border: 1px solid #338fff;
  529. color: var(--ls-secondary-text-color);
  530. }
  531. .tl-logseq-portal-header {
  532. backdrop-filter: brightness(1.2);
  533. }
  534. }