styles.css 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  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'] .view-content {
  10. padding: 0;
  11. }
  12. .loading>svg {
  13. animation: 2s linear infinite loading;
  14. transform-origin: 50% 50%;
  15. display: inline-block;
  16. }
  17. .obsidian-git-center {
  18. margin: auto;
  19. text-align: center;
  20. width: 50%;
  21. }
  22. .obsidian-git-textarea {
  23. display: block;
  24. margin-left: auto;
  25. margin-right: auto;
  26. }
  27. .obsidian-git-center-button {
  28. display: block;
  29. margin: 20px auto;
  30. }
  31. .tooltip.mod-left {
  32. overflow-wrap: break-word;
  33. }
  34. .tooltip.mod-right {
  35. overflow-wrap: break-word;
  36. }
  37. .obsidian-git-shortcuts {
  38. margin: 10px;
  39. }
  40. .diff-err {
  41. height: 100%;
  42. display: flex;
  43. justify-content: center;
  44. flex-direction: column;
  45. align-items: center;
  46. }
  47. .diff-err-sign {
  48. font-size: 2em;
  49. }
  50. .workspace-leaf-content[data-type="diff-view"] .d2h-d-none {
  51. display: none;
  52. }
  53. .workspace-leaf-content[data-type="diff-view"] .d2h-wrapper {
  54. text-align: left;
  55. }
  56. .workspace-leaf-content[data-type="diff-view"] .d2h-file-header {
  57. background-color: var(--background-primary);
  58. border-bottom: 1px solid var(--interactive-accent);
  59. font-family: var(--font-monospace);
  60. height: 35px;
  61. padding: 5px 10px;
  62. }
  63. .workspace-leaf-content[data-type="diff-view"] .d2h-file-header,
  64. .workspace-leaf-content[data-type="diff-view"] .d2h-file-stats {
  65. display: -webkit-box;
  66. display: -ms-flexbox;
  67. display: flex;
  68. }
  69. .workspace-leaf-content[data-type="diff-view"] .d2h-file-stats {
  70. font-size: 14px;
  71. margin-left: auto;
  72. }
  73. .workspace-leaf-content[data-type="diff-view"] .d2h-lines-added {
  74. border: 1px solid #b4e2b4;
  75. border-radius: 5px 0 0 5px;
  76. color: #399839;
  77. padding: 2px;
  78. text-align: right;
  79. vertical-align: middle;
  80. }
  81. .workspace-leaf-content[data-type="diff-view"] .d2h-lines-deleted {
  82. border: 1px solid #e9aeae;
  83. border-radius: 0 5px 5px 0;
  84. color: #c33;
  85. margin-left: 1px;
  86. padding: 2px;
  87. text-align: left;
  88. vertical-align: middle;
  89. }
  90. .workspace-leaf-content[data-type="diff-view"] .d2h-file-name-wrapper {
  91. -webkit-box-align: center;
  92. -ms-flex-align: center;
  93. align-items: center;
  94. display: -webkit-box;
  95. display: -ms-flexbox;
  96. display: flex;
  97. font-size: 15px;
  98. width: 100%;
  99. }
  100. .workspace-leaf-content[data-type="diff-view"] .d2h-file-name {
  101. overflow-x: hidden;
  102. text-overflow: ellipsis;
  103. white-space: nowrap;
  104. }
  105. .workspace-leaf-content[data-type="diff-view"] .d2h-file-wrapper {
  106. border: 1px solid var(--background-modifier-border);
  107. border-radius: 3px;
  108. margin-bottom: 1em;
  109. }
  110. .workspace-leaf-content[data-type="diff-view"] .d2h-file-collapse {
  111. -webkit-box-pack: end;
  112. -ms-flex-pack: end;
  113. -webkit-box-align: center;
  114. -ms-flex-align: center;
  115. align-items: center;
  116. border: 1px solid var(--background-modifier-border);
  117. border-radius: 3px;
  118. cursor: pointer;
  119. display: none;
  120. font-size: 12px;
  121. justify-content: flex-end;
  122. padding: 4px 8px;
  123. }
  124. .workspace-leaf-content[data-type="diff-view"] .d2h-file-collapse.d2h-selected {
  125. background-color: #c8e1ff;
  126. }
  127. .workspace-leaf-content[data-type="diff-view"] .d2h-file-collapse-input {
  128. margin: 0 4px 0 0;
  129. }
  130. .workspace-leaf-content[data-type="diff-view"] .d2h-diff-table {
  131. border-collapse: collapse;
  132. font-family: Menlo, Consolas, monospace;
  133. font-size: 13px;
  134. width: 100%;
  135. }
  136. .workspace-leaf-content[data-type="diff-view"] .d2h-files-diff {
  137. width: 100%;
  138. }
  139. .workspace-leaf-content[data-type="diff-view"] .d2h-file-diff {
  140. overflow-y: hidden;
  141. }
  142. .workspace-leaf-content[data-type="diff-view"] .d2h-file-side-diff {
  143. display: inline-block;
  144. margin-bottom: -8px;
  145. margin-right: -4px;
  146. overflow-x: scroll;
  147. overflow-y: hidden;
  148. width: 50%;
  149. }
  150. .workspace-leaf-content[data-type="diff-view"] .d2h-code-line {
  151. padding: 0 8em;
  152. }
  153. .workspace-leaf-content[data-type="diff-view"] .d2h-code-line,
  154. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line {
  155. display: inline-block;
  156. -webkit-user-select: none;
  157. -moz-user-select: none;
  158. -ms-user-select: none;
  159. user-select: none;
  160. white-space: nowrap;
  161. width: 100%;
  162. }
  163. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line {
  164. padding: 0 4.5em;
  165. }
  166. .workspace-leaf-content[data-type="diff-view"] .d2h-code-line-ctn {
  167. word-wrap: normal;
  168. background: none;
  169. display: inline-block;
  170. padding: 0;
  171. -webkit-user-select: text;
  172. -moz-user-select: text;
  173. -ms-user-select: text;
  174. user-select: text;
  175. vertical-align: middle;
  176. white-space: pre;
  177. width: 100%;
  178. }
  179. .theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-code-line del,
  180. .theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line del {
  181. background-color: #ffb6ba;
  182. }
  183. .theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-code-line del,
  184. .theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line del {
  185. background-color: #8d232881;
  186. }
  187. .workspace-leaf-content[data-type="diff-view"] .d2h-code-line del,
  188. .workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins,
  189. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line del,
  190. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line ins {
  191. border-radius: 0.2em;
  192. display: inline-block;
  193. margin-top: -1px;
  194. text-decoration: none;
  195. vertical-align: middle;
  196. }
  197. .theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins,
  198. .theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line ins {
  199. background-color: #97f295;
  200. text-align: left;
  201. }
  202. .theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins,
  203. .theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line ins {
  204. background-color: #1d921996;
  205. text-align: left;
  206. }
  207. .workspace-leaf-content[data-type="diff-view"] .d2h-code-line-prefix {
  208. word-wrap: normal;
  209. background: none;
  210. display: inline;
  211. padding: 0;
  212. white-space: pre;
  213. }
  214. .workspace-leaf-content[data-type="diff-view"] .line-num1 {
  215. float: left;
  216. }
  217. .workspace-leaf-content[data-type="diff-view"] .line-num1,
  218. .workspace-leaf-content[data-type="diff-view"] .line-num2 {
  219. -webkit-box-sizing: border-box;
  220. box-sizing: border-box;
  221. overflow: hidden;
  222. padding: 0 0.5em;
  223. text-overflow: ellipsis;
  224. width: 3.5em;
  225. }
  226. .workspace-leaf-content[data-type="diff-view"] .line-num2 {
  227. float: right;
  228. }
  229. .workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber {
  230. background-color: var(--background-primary);
  231. border: solid var(--background-modifier-border);
  232. border-width: 0 1px;
  233. -webkit-box-sizing: border-box;
  234. box-sizing: border-box;
  235. color: var(--text-muted);
  236. cursor: pointer;
  237. display: inline-block;
  238. position: absolute;
  239. text-align: right;
  240. width: 7.5em;
  241. }
  242. .workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber:after {
  243. content: "\200b";
  244. }
  245. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber {
  246. background-color: var(--background-primary);
  247. border: solid var(--background-modifier-border);
  248. border-width: 0 1px;
  249. -webkit-box-sizing: border-box;
  250. box-sizing: border-box;
  251. color: var(--text-muted);
  252. cursor: pointer;
  253. display: inline-block;
  254. overflow: hidden;
  255. padding: 0 0.5em;
  256. position: absolute;
  257. text-align: right;
  258. text-overflow: ellipsis;
  259. width: 4em;
  260. }
  261. .workspace-leaf-content[data-type="diff-view"] .d2h-diff-tbody tr {
  262. position: relative;
  263. }
  264. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber:after {
  265. content: "\200b";
  266. }
  267. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-emptyplaceholder,
  268. .workspace-leaf-content[data-type="diff-view"] .d2h-emptyplaceholder {
  269. background-color: var(--background-primary);
  270. border-color: var(--background-modifier-border);
  271. }
  272. .workspace-leaf-content[data-type="diff-view"] .d2h-code-line-prefix,
  273. .workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber,
  274. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber,
  275. .workspace-leaf-content[data-type="diff-view"] .d2h-emptyplaceholder {
  276. -webkit-user-select: none;
  277. -moz-user-select: none;
  278. -ms-user-select: none;
  279. user-select: none;
  280. }
  281. .workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber,
  282. .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber {
  283. direction: rtl;
  284. }
  285. .theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-del {
  286. background-color: #fee8e9;
  287. border-color: #e9aeae;
  288. }
  289. .theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-ins {
  290. background-color: #dfd;
  291. border-color: #b4e2b4;
  292. }
  293. .theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-del {
  294. background-color: #521b1d83;
  295. border-color: #691d1d73;
  296. }
  297. .theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-ins {
  298. background-color: rgba(30, 71, 30, 0.5);
  299. border-color: #13501381;
  300. }
  301. .workspace-leaf-content[data-type="diff-view"] .d2h-info {
  302. background-color: var(--background-primary);
  303. border-color: var(--background-modifier-border);
  304. color: var(--text-normal);
  305. }
  306. .theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-file-diff .d2h-del.d2h-change {
  307. background-color: #fdf2d0;
  308. }
  309. .theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-file-diff .d2h-del.d2h-change {
  310. background-color: #55492480;
  311. }
  312. .theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-file-diff .d2h-ins.d2h-change {
  313. background-color: #ded;
  314. }
  315. .theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-file-diff .d2h-ins.d2h-change {
  316. background-color: rgba(37, 78, 37, 0.418);
  317. }
  318. .workspace-leaf-content[data-type="diff-view"] .d2h-file-list-wrapper {
  319. margin-bottom: 10px;
  320. }
  321. .workspace-leaf-content[data-type="diff-view"] .d2h-file-list-wrapper a {
  322. color: #3572b0;
  323. text-decoration: none;
  324. }
  325. .workspace-leaf-content[data-type="diff-view"] .d2h-file-list-wrapper a:visited {
  326. color: #3572b0;
  327. }
  328. .workspace-leaf-content[data-type="diff-view"] .d2h-file-list-header {
  329. text-align: left;
  330. }
  331. .workspace-leaf-content[data-type="diff-view"] .d2h-file-list-title {
  332. font-weight: 700;
  333. }
  334. .workspace-leaf-content[data-type="diff-view"] .d2h-file-list-line {
  335. display: -webkit-box;
  336. display: -ms-flexbox;
  337. display: flex;
  338. text-align: left;
  339. }
  340. .workspace-leaf-content[data-type="diff-view"] .d2h-file-list {
  341. display: block;
  342. list-style: none;
  343. margin: 0;
  344. padding: 0;
  345. }
  346. .workspace-leaf-content[data-type="diff-view"] .d2h-file-list>li {
  347. border-bottom: 1px solid var(--background-modifier-border);
  348. margin: 0;
  349. padding: 5px 10px;
  350. }
  351. .workspace-leaf-content[data-type="diff-view"] .d2h-file-list>li:last-child {
  352. border-bottom: none;
  353. }
  354. .workspace-leaf-content[data-type="diff-view"] .d2h-file-switch {
  355. cursor: pointer;
  356. display: none;
  357. font-size: 10px;
  358. }
  359. .workspace-leaf-content[data-type="diff-view"] .d2h-icon {
  360. fill: currentColor;
  361. margin-right: 10px;
  362. vertical-align: middle;
  363. }
  364. .workspace-leaf-content[data-type="diff-view"] .d2h-deleted {
  365. color: #c33;
  366. }
  367. .workspace-leaf-content[data-type="diff-view"] .d2h-added {
  368. color: #399839;
  369. }
  370. .workspace-leaf-content[data-type="diff-view"] .d2h-changed {
  371. color: #d0b44c;
  372. }
  373. .workspace-leaf-content[data-type="diff-view"] .d2h-moved {
  374. color: #3572b0;
  375. }
  376. .workspace-leaf-content[data-type="diff-view"] .d2h-tag {
  377. background-color: var(--background-primary);
  378. display: -webkit-box;
  379. display: -ms-flexbox;
  380. display: flex;
  381. font-size: 10px;
  382. margin-left: 5px;
  383. padding: 0 2px;
  384. }
  385. .workspace-leaf-content[data-type="diff-view"] .d2h-deleted-tag {
  386. border: 2px solid #c33;
  387. }
  388. .workspace-leaf-content[data-type="diff-view"] .d2h-added-tag {
  389. border: 1px solid #399839;
  390. }
  391. .workspace-leaf-content[data-type="diff-view"] .d2h-changed-tag {
  392. border: 1px solid #d0b44c;
  393. }
  394. .workspace-leaf-content[data-type="diff-view"] .d2h-moved-tag {
  395. border: 1px solid #3572b0;
  396. }