styles.css 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  1. @keyframes loading {
  2. 0% {
  3. transform: rotate(0deg);
  4. }
  5. 100% {
  6. transform: rotate(360deg);
  7. }
  8. }
  9. .workspace-leaf-content[data-type="git-view"] .button-border {
  10. border: 2px solid var(--interactive-accent);
  11. border-radius: var(--radius-s);
  12. }
  13. .workspace-leaf-content[data-type="git-view"] .view-content {
  14. padding: 0;
  15. }
  16. .workspace-leaf-content[data-type="git-history-view"] .view-content {
  17. padding: 0;
  18. }
  19. .loading > svg {
  20. animation: 2s linear infinite loading;
  21. transform-origin: 50% 50%;
  22. display: inline-block;
  23. }
  24. .obsidian-git-center {
  25. margin: auto;
  26. text-align: center;
  27. width: 50%;
  28. }
  29. .obsidian-git-textarea {
  30. display: block;
  31. margin-left: auto;
  32. margin-right: auto;
  33. }
  34. .obsidian-git-disabled {
  35. opacity: 0.5;
  36. }
  37. .obsidian-git-center-button {
  38. display: block;
  39. margin: 20px auto;
  40. }
  41. .tooltip.mod-left {
  42. overflow-wrap: break-word;
  43. }
  44. .tooltip.mod-right {
  45. overflow-wrap: break-word;
  46. }
  47. .git-tools {
  48. display: flex;
  49. margin-left: auto;
  50. }
  51. .git-tools .type {
  52. padding-left: var(--size-2-1);
  53. display: flex;
  54. align-items: center;
  55. justify-content: center;
  56. width: 11px;
  57. }
  58. .git-tools .type[data-type="M"] {
  59. color: orange;
  60. }
  61. .git-tools .type[data-type="D"] {
  62. color: red;
  63. }
  64. .git-tools .buttons {
  65. display: flex;
  66. }
  67. .git-tools .buttons > * {
  68. padding: 0 0;
  69. height: auto;
  70. }
  71. .is-active .git-tools .buttons > * {
  72. color: var(--nav-item-color-active);
  73. }
  74. .git-author {
  75. color: var(--text-accent);
  76. }
  77. .git-date {
  78. color: var(--text-accent);
  79. }
  80. .git-ref {
  81. color: var(--text-accent);
  82. }
  83. .workspace-leaf-content[data-type="diff-view"] .d2h-d-none {
  84. display: none;
  85. }
  86. .workspace-leaf-content[data-type="diff-view"] .d2h-wrapper {
  87. text-align: left;
  88. }
  89. .workspace-leaf-content[data-type="diff-view"] .d2h-file-header {
  90. background-color: var(--background-primary);
  91. border-bottom: 1px solid var(--interactive-accent);
  92. font-family: var(--font-monospace);
  93. height: 35px;
  94. padding: 5px 10px;
  95. }
  96. .workspace-leaf-content[data-type="diff-view"] .d2h-file-header,
  97. .workspace-leaf-content[data-type="diff-view"] .d2h-file-stats {
  98. display: -webkit-box;
  99. display: -ms-flexbox;
  100. display: flex;
  101. }
  102. .workspace-leaf-content[data-type="diff-view"] .d2h-file-stats {
  103. font-size: 14px;
  104. margin-left: auto;
  105. }
  106. .workspace-leaf-content[data-type="diff-view"] .d2h-lines-added {
  107. border: 1px solid #b4e2b4;
  108. border-radius: 5px 0 0 5px;
  109. color: #399839;
  110. padding: 2px;
  111. text-align: right;
  112. vertical-align: middle;
  113. }
  114. .workspace-leaf-content[data-type="diff-view"] .d2h-lines-deleted {
  115. border: 1px solid #e9aeae;
  116. border-radius: 0 5px 5px 0;
  117. color: #c33;
  118. margin-left: 1px;
  119. padding: 2px;
  120. text-align: left;
  121. vertical-align: middle;
  122. }
  123. .workspace-leaf-content[data-type="diff-view"] .d2h-file-name-wrapper {
  124. -webkit-box-align: center;
  125. -ms-flex-align: center;
  126. align-items: center;
  127. display: -webkit-box;
  128. display: -ms-flexbox;
  129. display: flex;
  130. font-size: 15px;
  131. width: 100%;
  132. }
  133. .workspace-leaf-content[data-type="diff-view"] .d2h-file-name {
  134. overflow-x: hidden;
  135. text-overflow: ellipsis;
  136. white-space: nowrap;
  137. }
  138. .workspace-leaf-content[data-type="diff-view"] .d2h-file-wrapper {
  139. border: 1px solid var(--background-modifier-border);
  140. border-radius: 3px;
  141. margin-bottom: 1em;
  142. }
  143. .workspace-leaf-content[data-type="diff-view"] .d2h-file-collapse {
  144. -webkit-box-pack: end;
  145. -ms-flex-pack: end;
  146. -webkit-box-align: center;
  147. -ms-flex-align: center;
  148. align-items: center;
  149. border: 1px solid var(--background-modifier-border);
  150. border-radius: 3px;
  151. cursor: pointer;
  152. display: none;
  153. font-size: 12px;
  154. justify-content: flex-end;
  155. padding: 4px 8px;
  156. }
  157. .workspace-leaf-content[data-type="diff-view"] .d2h-file-collapse.d2h-selected {
  158. background-color: #c8e1ff;
  159. }
  160. .workspace-leaf-content[data-type="diff-view"] .d2h-file-collapse-input {
  161. margin: 0 4px 0 0;
  162. }
  163. .workspace-leaf-content[data-type="diff-view"] .d2h-diff-table {
  164. border-collapse: collapse;
  165. font-family: Menlo, Consolas, monospace;
  166. font-size: 13px;
  167. width: 100%;
  168. }
  169. .workspace-leaf-content[data-type="diff-view"] .d2h-files-diff {
  170. width: 100%;
  171. }
  172. .workspace-leaf-content[data-type="diff-view"] .d2h-file-diff {
  173. overflow-y: hidden;
  174. }
  175. .workspace-leaf-content[data-type="diff-view"] .d2h-file-side-diff {
  176. display: inline-block;
  177. margin-bottom: -8px;
  178. margin-right: -4px;
  179. overflow-x: scroll;
  180. overflow-y: hidden;
  181. width: 50%;
  182. }
  183. .workspace-leaf-content[data-type="diff-view"] .d2h-code-line {
  184. padding: 0 8em;
  185. }
  186. .workspace-leaf-content[data-type="diff-view"] .d2h-code-line,
  187. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line {
  188. display: inline-block;
  189. -webkit-user-select: none;
  190. -moz-user-select: none;
  191. -ms-user-select: none;
  192. user-select: none;
  193. white-space: nowrap;
  194. width: 100%;
  195. }
  196. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line {
  197. padding: 0 4.5em;
  198. }
  199. .workspace-leaf-content[data-type="diff-view"] .d2h-code-line-ctn {
  200. word-wrap: normal;
  201. background: none;
  202. display: inline-block;
  203. padding: 0;
  204. -webkit-user-select: text;
  205. -moz-user-select: text;
  206. -ms-user-select: text;
  207. user-select: text;
  208. vertical-align: middle;
  209. white-space: pre;
  210. width: 100%;
  211. }
  212. .theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-code-line del,
  213. .theme-light
  214. .workspace-leaf-content[data-type="diff-view"]
  215. .d2h-code-side-line
  216. del {
  217. background-color: #ffb6ba;
  218. }
  219. .theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-code-line del,
  220. .theme-dark
  221. .workspace-leaf-content[data-type="diff-view"]
  222. .d2h-code-side-line
  223. del {
  224. background-color: #8d232881;
  225. }
  226. .workspace-leaf-content[data-type="diff-view"] .d2h-code-line del,
  227. .workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins,
  228. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line del,
  229. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line ins {
  230. border-radius: 0.2em;
  231. display: inline-block;
  232. margin-top: -1px;
  233. text-decoration: none;
  234. vertical-align: middle;
  235. }
  236. .theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins,
  237. .theme-light
  238. .workspace-leaf-content[data-type="diff-view"]
  239. .d2h-code-side-line
  240. ins {
  241. background-color: #97f295;
  242. text-align: left;
  243. }
  244. .theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins,
  245. .theme-dark
  246. .workspace-leaf-content[data-type="diff-view"]
  247. .d2h-code-side-line
  248. ins {
  249. background-color: #1d921996;
  250. text-align: left;
  251. }
  252. .workspace-leaf-content[data-type="diff-view"] .d2h-code-line-prefix {
  253. word-wrap: normal;
  254. background: none;
  255. display: inline;
  256. padding: 0;
  257. white-space: pre;
  258. }
  259. .workspace-leaf-content[data-type="diff-view"] .line-num1 {
  260. float: left;
  261. }
  262. .workspace-leaf-content[data-type="diff-view"] .line-num1,
  263. .workspace-leaf-content[data-type="diff-view"] .line-num2 {
  264. -webkit-box-sizing: border-box;
  265. box-sizing: border-box;
  266. overflow: hidden;
  267. padding: 0 0.5em;
  268. text-overflow: ellipsis;
  269. width: 3.5em;
  270. }
  271. .workspace-leaf-content[data-type="diff-view"] .line-num2 {
  272. float: right;
  273. }
  274. .workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber {
  275. background-color: var(--background-primary);
  276. border: solid var(--background-modifier-border);
  277. border-width: 0 1px;
  278. -webkit-box-sizing: border-box;
  279. box-sizing: border-box;
  280. color: var(--text-muted);
  281. cursor: pointer;
  282. display: inline-block;
  283. position: absolute;
  284. text-align: right;
  285. width: 7.5em;
  286. }
  287. .workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber:after {
  288. content: "\200b";
  289. }
  290. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber {
  291. background-color: var(--background-primary);
  292. border: solid var(--background-modifier-border);
  293. border-width: 0 1px;
  294. -webkit-box-sizing: border-box;
  295. box-sizing: border-box;
  296. color: var(--text-muted);
  297. cursor: pointer;
  298. display: inline-block;
  299. overflow: hidden;
  300. padding: 0 0.5em;
  301. position: absolute;
  302. text-align: right;
  303. text-overflow: ellipsis;
  304. width: 4em;
  305. }
  306. .workspace-leaf-content[data-type="diff-view"] .d2h-diff-tbody tr {
  307. position: relative;
  308. }
  309. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber:after {
  310. content: "\200b";
  311. }
  312. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-emptyplaceholder,
  313. .workspace-leaf-content[data-type="diff-view"] .d2h-emptyplaceholder {
  314. background-color: var(--background-primary);
  315. border-color: var(--background-modifier-border);
  316. }
  317. .workspace-leaf-content[data-type="diff-view"] .d2h-code-line-prefix,
  318. .workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber,
  319. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber,
  320. .workspace-leaf-content[data-type="diff-view"] .d2h-emptyplaceholder {
  321. -webkit-user-select: none;
  322. -moz-user-select: none;
  323. -ms-user-select: none;
  324. user-select: none;
  325. }
  326. .workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber,
  327. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber {
  328. direction: rtl;
  329. }
  330. .theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-del {
  331. background-color: #fee8e9;
  332. border-color: #e9aeae;
  333. }
  334. .theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-ins {
  335. background-color: #dfd;
  336. border-color: #b4e2b4;
  337. }
  338. .theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-del {
  339. background-color: #521b1d83;
  340. border-color: #691d1d73;
  341. }
  342. .theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-ins {
  343. background-color: rgba(30, 71, 30, 0.5);
  344. border-color: #13501381;
  345. }
  346. .workspace-leaf-content[data-type="diff-view"] .d2h-info {
  347. background-color: var(--background-primary);
  348. border-color: var(--background-modifier-border);
  349. color: var(--text-normal);
  350. }
  351. .theme-light
  352. .workspace-leaf-content[data-type="diff-view"]
  353. .d2h-file-diff
  354. .d2h-del.d2h-change {
  355. background-color: #fdf2d0;
  356. }
  357. .theme-dark
  358. .workspace-leaf-content[data-type="diff-view"]
  359. .d2h-file-diff
  360. .d2h-del.d2h-change {
  361. background-color: #55492480;
  362. }
  363. .theme-light
  364. .workspace-leaf-content[data-type="diff-view"]
  365. .d2h-file-diff
  366. .d2h-ins.d2h-change {
  367. background-color: #ded;
  368. }
  369. .theme-dark
  370. .workspace-leaf-content[data-type="diff-view"]
  371. .d2h-file-diff
  372. .d2h-ins.d2h-change {
  373. background-color: rgba(37, 78, 37, 0.418);
  374. }
  375. .workspace-leaf-content[data-type="diff-view"] .d2h-file-list-wrapper {
  376. margin-bottom: 10px;
  377. }
  378. .workspace-leaf-content[data-type="diff-view"] .d2h-file-list-wrapper a {
  379. color: #3572b0;
  380. text-decoration: none;
  381. }
  382. .workspace-leaf-content[data-type="diff-view"]
  383. .d2h-file-list-wrapper
  384. a:visited {
  385. color: #3572b0;
  386. }
  387. .workspace-leaf-content[data-type="diff-view"] .d2h-file-list-header {
  388. text-align: left;
  389. }
  390. .workspace-leaf-content[data-type="diff-view"] .d2h-file-list-title {
  391. font-weight: 700;
  392. }
  393. .workspace-leaf-content[data-type="diff-view"] .d2h-file-list-line {
  394. display: -webkit-box;
  395. display: -ms-flexbox;
  396. display: flex;
  397. text-align: left;
  398. }
  399. .workspace-leaf-content[data-type="diff-view"] .d2h-file-list {
  400. display: block;
  401. list-style: none;
  402. margin: 0;
  403. padding: 0;
  404. }
  405. .workspace-leaf-content[data-type="diff-view"] .d2h-file-list > li {
  406. border-bottom: 1px solid var(--background-modifier-border);
  407. margin: 0;
  408. padding: 5px 10px;
  409. }
  410. .workspace-leaf-content[data-type="diff-view"] .d2h-file-list > li:last-child {
  411. border-bottom: none;
  412. }
  413. .workspace-leaf-content[data-type="diff-view"] .d2h-file-switch {
  414. cursor: pointer;
  415. display: none;
  416. font-size: 10px;
  417. }
  418. .workspace-leaf-content[data-type="diff-view"] .d2h-icon {
  419. fill: currentColor;
  420. margin-right: 10px;
  421. vertical-align: middle;
  422. }
  423. .workspace-leaf-content[data-type="diff-view"] .d2h-deleted {
  424. color: #c33;
  425. }
  426. .workspace-leaf-content[data-type="diff-view"] .d2h-added {
  427. color: #399839;
  428. }
  429. .workspace-leaf-content[data-type="diff-view"] .d2h-changed {
  430. color: #d0b44c;
  431. }
  432. .workspace-leaf-content[data-type="diff-view"] .d2h-moved {
  433. color: #3572b0;
  434. }
  435. .workspace-leaf-content[data-type="diff-view"] .d2h-tag {
  436. background-color: var(--background-primary);
  437. display: -webkit-box;
  438. display: -ms-flexbox;
  439. display: flex;
  440. font-size: 10px;
  441. margin-left: 5px;
  442. padding: 0 2px;
  443. }
  444. .workspace-leaf-content[data-type="diff-view"] .d2h-deleted-tag {
  445. border: 2px solid #c33;
  446. }
  447. .workspace-leaf-content[data-type="diff-view"] .d2h-added-tag {
  448. border: 1px solid #399839;
  449. }
  450. .workspace-leaf-content[data-type="diff-view"] .d2h-changed-tag {
  451. border: 1px solid #d0b44c;
  452. }
  453. .workspace-leaf-content[data-type="diff-view"] .d2h-moved-tag {
  454. border: 1px solid #3572b0;
  455. }
  456. /* ====================== Line Authoring Information ====================== */
  457. .cm-gutterElement.obs-git-blame-gutter {
  458. /* Add background color to spacing inbetween and around the gutter for better aesthetics */
  459. border-width: 0px 2px 0.2px 2px;
  460. border-style: solid;
  461. border-color: var(--background-secondary);
  462. background-color: var(--background-secondary);
  463. }
  464. .cm-gutterElement.obs-git-blame-gutter > div,
  465. .line-author-settings-preview {
  466. /* delegate text color to settings */
  467. color: var(--obs-git-gutter-text);
  468. font-family: monospace;
  469. height: 100%; /* ensure, that age-based background color occupies entire parent */
  470. text-align: right;
  471. padding: 0px 6px 0px 6px;
  472. white-space: pre; /* Keep spaces and do not collapse them. */
  473. }
  474. @media (max-width: 800px) {
  475. /* hide git blame gutter not to superpose text */
  476. .cm-gutterElement.obs-git-blame-gutter {
  477. display: none;
  478. }
  479. }
  480. .git-unified-diff-view,
  481. .git-split-diff-view .cm-deletedLine .cm-changedText {
  482. background-color: #ee443330;
  483. }
  484. .git-unified-diff-view,
  485. .git-split-diff-view .cm-insertedLine .cm-changedText {
  486. background-color: #22bb2230;
  487. }