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.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  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: -webkit-max-content;
  241. width: -moz-max-content;
  242. width: max-content;
  243. max-width: 100%;
  244. overflow: auto;
  245. }
  246. table th {
  247. font-weight: 600;
  248. }
  249. table th,
  250. table td {
  251. padding: 6px 13px !important;
  252. border: 1px solid var(--color-secondary) !important;
  253. }
  254. table tr {
  255. border-top: 1px solid var(--color-secondary);
  256. }
  257. table tr:nth-child(2n) {
  258. background-color: var(--color-markup-table-row);
  259. }
  260. img {
  261. max-width: 100%;
  262. box-sizing: initial;
  263. }
  264. img[align="right"] {
  265. padding-left: 20px;
  266. }
  267. img[align="left"] {
  268. padding-right: 20px;
  269. }
  270. .emoji {
  271. max-width: none;
  272. vertical-align: text-top;
  273. }
  274. span.frame {
  275. display: block;
  276. overflow: hidden;
  277. }
  278. span.frame > span {
  279. display: block;
  280. float: left;
  281. width: auto;
  282. padding: 7px;
  283. margin: 13px 0 0;
  284. overflow: hidden;
  285. border: 1px solid var(--color-secondary);
  286. }
  287. span.frame span img {
  288. display: block;
  289. float: left;
  290. }
  291. span.frame span span {
  292. display: block;
  293. padding: 5px 0 0;
  294. clear: both;
  295. color: var(--color-text);
  296. }
  297. span.align-center {
  298. display: block;
  299. overflow: hidden;
  300. clear: both;
  301. }
  302. span.align-center > span {
  303. display: block;
  304. margin: 13px auto 0;
  305. overflow: hidden;
  306. text-align: center;
  307. }
  308. span.align-center span img {
  309. margin: 0 auto;
  310. text-align: center;
  311. }
  312. span.align-right {
  313. display: block;
  314. overflow: hidden;
  315. clear: both;
  316. }
  317. span.align-right > span {
  318. display: block;
  319. margin: 13px 0 0;
  320. overflow: hidden;
  321. text-align: right;
  322. }
  323. span.align-right span img {
  324. margin: 0;
  325. text-align: right;
  326. }
  327. span.float-left {
  328. display: block;
  329. float: left;
  330. margin-right: 13px;
  331. overflow: hidden;
  332. }
  333. span.float-left span {
  334. margin: 13px 0 0;
  335. }
  336. span.float-right {
  337. display: block;
  338. float: right;
  339. margin-left: 13px;
  340. overflow: hidden;
  341. }
  342. span.float-right > span {
  343. display: block;
  344. margin: 13px auto 0;
  345. overflow: hidden;
  346. text-align: right;
  347. }
  348. code,
  349. tt {
  350. padding: .2em .4em;
  351. margin: 0;
  352. font-size: 85%;
  353. background-color: var(--color-markup-code-block);
  354. border-radius: 4px;
  355. }
  356. code br,
  357. tt br {
  358. display: none;
  359. }
  360. del code {
  361. text-decoration: inherit;
  362. }
  363. pre > code {
  364. padding: 0;
  365. margin: 0;
  366. font-size: 100%;
  367. white-space: pre-wrap;
  368. word-break: break-all;
  369. overflow-wrap: break-word;
  370. background: transparent;
  371. border: 0;
  372. }
  373. .highlight {
  374. margin-bottom: 16px;
  375. }
  376. .highlight pre,
  377. pre {
  378. padding: 16px;
  379. font-size: 85%;
  380. line-height: 1.45;
  381. background-color: var(--color-markup-code-block);
  382. border-radius: 4px;
  383. }
  384. .highlight pre {
  385. margin-bottom: 0;
  386. word-break: normal;
  387. }
  388. pre {
  389. word-wrap: normal;
  390. }
  391. pre code,
  392. pre tt {
  393. display: inline;
  394. max-width: initial;
  395. padding: 0;
  396. margin: 0;
  397. overflow: initial;
  398. line-height: inherit;
  399. word-wrap: normal;
  400. background-color: transparent;
  401. border: 0;
  402. }
  403. pre code::before,
  404. pre code::after,
  405. pre tt::before,
  406. pre tt::after {
  407. content: normal;
  408. }
  409. kbd {
  410. display: inline-block;
  411. padding: 3px 5px;
  412. font-size: 11px;
  413. line-height: 10px;
  414. color: var(--color-text-light);
  415. vertical-align: middle;
  416. background-color: var(--color-markup-code-block);
  417. border: 1px solid var(--color-secondary);
  418. border-radius: 3px;
  419. box-shadow: inset 0 -1px 0 var(--color-secondary);
  420. }
  421. .ui.list .list,
  422. ol.ui.list ol,
  423. ul.ui.list ul {
  424. padding-left: 2em;
  425. }
  426. }
  427. .repository.wiki.revisions {
  428. .ui.container > .ui.stackable.grid {
  429. -ms-flex-direction: row-reverse;
  430. flex-direction: row-reverse;
  431. > .header {
  432. margin-top: 0;
  433. .sub.header {
  434. padding-left: 52px;
  435. word-break: break-word;
  436. }
  437. }
  438. }
  439. }
  440. .file-revisions-btn {
  441. display: block;
  442. float: left;
  443. margin-bottom: 2px !important;
  444. padding: 11px !important;
  445. margin-right: 10px !important;
  446. i {
  447. &:extend(.unselectable);
  448. }
  449. }
  450. .markup-render {
  451. display: block;
  452. border: none;
  453. width: 100%;
  454. height: var(--height-loading); // actual height is set in JS after loading
  455. overflow: hidden;
  456. color-scheme: normal; // match the value inside the iframe to allow it to become transparent
  457. }
  458. .markup-block-error {
  459. border: 1px solid var(--color-error-border) !important;
  460. margin-bottom: 0 !important;
  461. border-bottom-left-radius: 0 !important;
  462. border-bottom-right-radius: 0 !important;
  463. box-shadow: none !important;
  464. font-size: 85% !important;
  465. white-space: pre-wrap !important;
  466. padding: .5rem 1rem !important;
  467. text-align: left !important;
  468. }
  469. .markup-block-error + pre {
  470. border-top: none !important;
  471. margin-top: 0 !important;
  472. border-top-left-radius: 0 !important;
  473. border-top-right-radius: 0 !important;
  474. }