You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

content.less 9.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  1. .markup {
  2. overflow: hidden;
  3. font-size: 16px;
  4. line-height: 1.5 !important;
  5. word-wrap: break-word;
  6. &.ui.segment {
  7. padding: 3em;
  8. }
  9. &.file-view {
  10. padding: 2em !important;
  11. }
  12. > *:first-child {
  13. margin-top: 0 !important;
  14. }
  15. > *:last-child {
  16. margin-bottom: 0 !important;
  17. }
  18. a:not([href]) {
  19. color: inherit;
  20. text-decoration: none;
  21. }
  22. .absent {
  23. color: var(--color-red);
  24. }
  25. .anchor {
  26. padding-right: 4px;
  27. margin-left: -20px;
  28. line-height: 1;
  29. color: inherit;
  30. }
  31. .anchor .svg {
  32. vertical-align: middle;
  33. }
  34. .anchor:focus {
  35. outline: none;
  36. }
  37. h1 .anchor .svg,
  38. h2 .anchor .svg,
  39. h3 .anchor .svg,
  40. h4 .anchor .svg,
  41. h5 .anchor .svg,
  42. h6 .anchor .svg {
  43. visibility: hidden;
  44. }
  45. h1:hover .anchor .svg,
  46. h2:hover .anchor .svg,
  47. h3:hover .anchor .svg,
  48. h4:hover .anchor .svg,
  49. h5:hover .anchor .svg,
  50. h6:hover .anchor .svg {
  51. visibility: visible;
  52. }
  53. h2 .anchor .svg,
  54. h3 .anchor .svg,
  55. h4 .anchor .svg {
  56. position: relative;
  57. top: -2px;
  58. }
  59. h1,
  60. h2,
  61. h3,
  62. h4,
  63. h5,
  64. h6 {
  65. margin-top: 24px;
  66. margin-bottom: 16px;
  67. font-weight: 600;
  68. line-height: 1.25;
  69. }
  70. h1 tt,
  71. h1 code,
  72. h2 tt,
  73. h2 code,
  74. h3 tt,
  75. h3 code,
  76. h4 tt,
  77. h4 code,
  78. h5 tt,
  79. h5 code,
  80. h6 tt,
  81. h6 code {
  82. font-size: inherit;
  83. }
  84. h1 {
  85. padding-bottom: .3em;
  86. font-size: 2em;
  87. border-bottom: 1px solid var(--color-secondary);
  88. }
  89. h2 {
  90. padding-bottom: .3em;
  91. font-size: 1.5em;
  92. border-bottom: 1px solid var(--color-secondary);
  93. }
  94. h3 {
  95. font-size: 1.25em;
  96. }
  97. h4 {
  98. font-size: 1em;
  99. }
  100. h5 {
  101. font-size: .875em;
  102. }
  103. h6 {
  104. font-size: .85em;
  105. color: var(--color-text-light-2);
  106. }
  107. p,
  108. blockquote,
  109. details,
  110. ul,
  111. ol,
  112. dl,
  113. table,
  114. pre {
  115. margin-top: 0;
  116. margin-bottom: 16px;
  117. }
  118. hr {
  119. height: 4px;
  120. padding: 0;
  121. margin: 16px 0;
  122. background-color: var(--color-secondary);
  123. border: 0;
  124. }
  125. ul,
  126. ol {
  127. padding-left: 2em;
  128. }
  129. ul.no-list,
  130. ol.no-list {
  131. padding: 0;
  132. list-style-type: none;
  133. }
  134. .task-list-item {
  135. list-style-type: none;
  136. position: relative;
  137. line-height: 1.5rem;
  138. min-height: 1.5rem; // to render a checkbox list without content `- [ ]`, we need this min-height to make sure the <li> can be visible
  139. input[type="checkbox"] {
  140. position: absolute;
  141. top: .25em;
  142. left: -1.6em;
  143. }
  144. p {
  145. line-height: 1.5rem;
  146. }
  147. }
  148. .task-list-item + .task-list-item {
  149. margin-top: 3px;
  150. }
  151. input[type="checkbox"] {
  152. -webkit-appearance: none;
  153. -moz-appearance: none;
  154. appearance: none;
  155. position: relative;
  156. border: 1px solid var(--color-secondary);
  157. border-radius: 2px;
  158. background: var(--color-input-background);
  159. height: 14px;
  160. width: 14px;
  161. opacity: 1 !important; // override fomantic on edit preview
  162. pointer-events: auto !important; // override fomantic on edit preview
  163. vertical-align: middle !important; // override fomantic on edit preview
  164. -webkit-print-color-adjust: exact;
  165. color-adjust: exact;
  166. }
  167. input[type="checkbox"]:not([disabled]):hover,
  168. input[type="checkbox"]:not([disabled]):active {
  169. border-color: var(--color-primary);
  170. }
  171. input[type="checkbox"]::after {
  172. position: absolute;
  173. left: 0;
  174. top: 0;
  175. bottom: 0;
  176. right: 0;
  177. pointer-events: none;
  178. background: var(--color-text);
  179. mask-size: cover;
  180. -webkit-mask-size: cover;
  181. }
  182. input[type="checkbox"]:checked::after {
  183. content: "";
  184. mask-image: var(--checkbox-mask-checked);
  185. -webkit-mask-image: var(--checkbox-mask-checked);
  186. -webkit-print-color-adjust: exact;
  187. color-adjust: exact;
  188. }
  189. input[type="checkbox"]:indeterminate::after {
  190. content: "";
  191. mask-image: var(--checkbox-mask-indeterminate);
  192. -webkit-mask-image: var(--checkbox-mask-indeterminate);
  193. }
  194. ul ul,
  195. ul ol,
  196. ol ol,
  197. ol ul {
  198. margin-top: 0;
  199. margin-bottom: 0;
  200. }
  201. ol ol,
  202. ul ol {
  203. list-style-type: lower-roman;
  204. }
  205. li > p {
  206. margin-top: 16px;
  207. }
  208. li + li {
  209. margin-top: .25em;
  210. }
  211. dl {
  212. padding: 0;
  213. }
  214. dl dt {
  215. padding: 0;
  216. margin-top: 16px;
  217. font-size: 1em;
  218. font-style: italic;
  219. font-weight: 600;
  220. }
  221. dl dd {
  222. padding: 0 16px;
  223. margin-bottom: 16px;
  224. }
  225. blockquote {
  226. margin-left: 0;
  227. padding: 0 15px;
  228. color: var(--color-text-light-2);
  229. border-left: 4px solid var(--color-secondary);
  230. }
  231. blockquote > :first-child {
  232. margin-top: 0;
  233. }
  234. blockquote > :last-child {
  235. margin-bottom: 0;
  236. }
  237. table {
  238. display: block;
  239. width: 100%;
  240. width: max-content;
  241. max-width: 100%;
  242. overflow: auto;
  243. }
  244. table th {
  245. font-weight: 600;
  246. }
  247. table th,
  248. table td {
  249. padding: 6px 13px !important;
  250. border: 1px solid var(--color-secondary) !important;
  251. }
  252. table tr {
  253. border-top: 1px solid var(--color-secondary);
  254. }
  255. table tr:nth-child(2n) {
  256. background-color: var(--color-markup-table-row);
  257. }
  258. img {
  259. max-width: 100%;
  260. box-sizing: initial;
  261. }
  262. img[align="right"] {
  263. padding-left: 20px;
  264. }
  265. img[align="left"] {
  266. padding-right: 20px;
  267. }
  268. .emoji {
  269. max-width: none;
  270. vertical-align: text-top;
  271. }
  272. span.frame {
  273. display: block;
  274. overflow: hidden;
  275. }
  276. span.frame > span {
  277. display: block;
  278. float: left;
  279. width: auto;
  280. padding: 7px;
  281. margin: 13px 0 0;
  282. overflow: hidden;
  283. border: 1px solid var(--color-secondary);
  284. }
  285. span.frame span img {
  286. display: block;
  287. float: left;
  288. }
  289. span.frame span span {
  290. display: block;
  291. padding: 5px 0 0;
  292. clear: both;
  293. color: var(--color-text);
  294. }
  295. span.align-center {
  296. display: block;
  297. overflow: hidden;
  298. clear: both;
  299. }
  300. span.align-center > span {
  301. display: block;
  302. margin: 13px auto 0;
  303. overflow: hidden;
  304. text-align: center;
  305. }
  306. span.align-center span img {
  307. margin: 0 auto;
  308. text-align: center;
  309. }
  310. span.align-right {
  311. display: block;
  312. overflow: hidden;
  313. clear: both;
  314. }
  315. span.align-right > span {
  316. display: block;
  317. margin: 13px 0 0;
  318. overflow: hidden;
  319. text-align: right;
  320. }
  321. span.align-right span img {
  322. margin: 0;
  323. text-align: right;
  324. }
  325. span.float-left {
  326. display: block;
  327. float: left;
  328. margin-right: 13px;
  329. overflow: hidden;
  330. }
  331. span.float-left span {
  332. margin: 13px 0 0;
  333. }
  334. span.float-right {
  335. display: block;
  336. float: right;
  337. margin-left: 13px;
  338. overflow: hidden;
  339. }
  340. span.float-right > span {
  341. display: block;
  342. margin: 13px auto 0;
  343. overflow: hidden;
  344. text-align: right;
  345. }
  346. code,
  347. tt {
  348. padding: .2em .4em;
  349. margin: 0;
  350. font-size: 85%;
  351. background-color: var(--color-markup-code-block);
  352. border-radius: 4px;
  353. }
  354. code br,
  355. tt br {
  356. display: none;
  357. }
  358. del code {
  359. text-decoration: inherit;
  360. }
  361. pre > code {
  362. padding: 0;
  363. margin: 0;
  364. font-size: 100%;
  365. white-space: pre-wrap;
  366. word-break: break-all;
  367. overflow-wrap: break-word;
  368. background: transparent;
  369. border: 0;
  370. }
  371. .highlight {
  372. margin-bottom: 16px;
  373. }
  374. .highlight pre,
  375. pre {
  376. padding: 16px;
  377. font-size: 85%;
  378. line-height: 1.45;
  379. background-color: var(--color-markup-code-block);
  380. border-radius: 4px;
  381. }
  382. .highlight pre {
  383. margin-bottom: 0;
  384. word-break: normal;
  385. }
  386. pre {
  387. word-wrap: normal;
  388. }
  389. pre code,
  390. pre tt {
  391. display: inline;
  392. max-width: initial;
  393. padding: 0;
  394. margin: 0;
  395. overflow: initial;
  396. line-height: inherit;
  397. word-wrap: normal;
  398. background-color: transparent;
  399. border: 0;
  400. }
  401. pre code::before,
  402. pre code::after,
  403. pre tt::before,
  404. pre tt::after {
  405. content: normal;
  406. }
  407. kbd {
  408. display: inline-block;
  409. padding: 3px 5px;
  410. font-size: 11px;
  411. line-height: 10px;
  412. color: var(--color-text-light);
  413. vertical-align: middle;
  414. background-color: var(--color-markup-code-block);
  415. border: 1px solid var(--color-secondary);
  416. border-radius: 3px;
  417. box-shadow: inset 0 -1px 0 var(--color-secondary);
  418. }
  419. .ui.list .list,
  420. ol.ui.list ol,
  421. ul.ui.list ul {
  422. padding-left: 2em;
  423. }
  424. }
  425. .repository.wiki.revisions {
  426. .ui.container > .ui.stackable.grid {
  427. -ms-flex-direction: row-reverse;
  428. flex-direction: row-reverse;
  429. > .header {
  430. margin-top: 0;
  431. .sub.header {
  432. padding-left: 52px;
  433. word-break: break-word;
  434. }
  435. }
  436. }
  437. }
  438. .file-revisions-btn {
  439. display: block;
  440. float: left;
  441. margin-bottom: 2px !important;
  442. padding: 11px !important;
  443. margin-right: 10px !important;
  444. i {
  445. &:extend(.unselectable);
  446. }
  447. }
  448. .markup-render {
  449. display: block;
  450. border: none;
  451. width: 100%;
  452. height: var(--height-loading); // actual height is set in JS after loading
  453. overflow: hidden;
  454. color-scheme: normal; // match the value inside the iframe to allow it to become transparent
  455. }
  456. .markup-block-error {
  457. border: 1px solid var(--color-error-border) !important;
  458. margin-bottom: 0 !important;
  459. border-bottom-left-radius: 0 !important;
  460. border-bottom-right-radius: 0 !important;
  461. box-shadow: none !important;
  462. font-size: 85% !important;
  463. white-space: pre-wrap !important;
  464. padding: .5rem 1rem !important;
  465. text-align: left !important;
  466. }
  467. .markup-block-error + pre {
  468. border-top: none !important;
  469. margin-top: 0 !important;
  470. border-top-left-radius: 0 !important;
  471. border-top-right-radius: 0 !important;
  472. }