_wiki.scss 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. %markdown-html {
  2. h1, h2, h3, h4, h5, h6 {
  3. margin-top: 1.6em;
  4. margin-bottom: .8em;
  5. &:first-child {
  6. margin-top: 0;
  7. }
  8. }
  9. h1 {
  10. margin-top: 2em;
  11. padding-bottom: 0.3em;
  12. font-size: 1.8em;
  13. line-height: 1.1em;
  14. border-bottom: solid 1px transparent;
  15. }
  16. h2 {
  17. padding-bottom: 0.5em;
  18. font-size: 1.4em;
  19. line-height: 1.225;
  20. font-weight: bold;
  21. border-bottom: 1px solid transparent;
  22. }
  23. h3 {
  24. font-size: 1.2em;
  25. font-weight: bold;
  26. }
  27. h4 {
  28. font-size: 1.1em;
  29. font-weight: normal;
  30. }
  31. h5 {
  32. font-size: 1.05em;
  33. font-weight: normal;
  34. }
  35. p {
  36. font-weight: normal;
  37. margin: 15px 0;
  38. }
  39. blockquote {
  40. font-size: .9em;
  41. margin: 0 0 30px 0;
  42. padding: 0 20px;
  43. color: lighten($gray-dark, 35%);
  44. }
  45. img {
  46. margin: 5px 0;
  47. max-width: 100%;
  48. }
  49. img.emojione {
  50. margin-top: -0.3em !important;
  51. margin-bottom: 0 !important;
  52. border: none;
  53. box-shadow: none;
  54. }
  55. ul, ol {
  56. padding-left: 30px;
  57. margin: 20px 0;
  58. li {
  59. margin: 5px 0;
  60. line-height: 1.8em;
  61. }
  62. ul, ol {
  63. margin: 0;
  64. }
  65. }
  66. // borrowed from https://www.npmjs.com/package/github-markdown-css
  67. .contains-task-list {
  68. .task-list-item {
  69. list-style-type: none;
  70. }
  71. .task-list-item+.task-list-item {
  72. margin-top: 3px;
  73. }
  74. .task-list-item input {
  75. margin: 0 0.2em 0.25em -1.6em;
  76. vertical-align: middle;
  77. }
  78. }
  79. pre.hljs {
  80. position: relative;
  81. cite {
  82. position: absolute;
  83. top: 0;
  84. right: 0;
  85. padding: 0 4px;
  86. background: #ccc;
  87. color: #333;
  88. font-style: normal;
  89. font-weight: bold;
  90. opacity: 0.6;
  91. }
  92. };
  93. p code { // only inline code blocks
  94. font-family: $font-family-monospace-not-strictly;
  95. }
  96. .page-template-builder {
  97. position: relative;
  98. .template-create-button {
  99. position: absolute;
  100. top: 8px;
  101. right: 8px;
  102. }
  103. }
  104. .highlighted {
  105. background-color: $brand-warning;
  106. }
  107. .revision-head {
  108. a {
  109. text-decoration: none;
  110. }
  111. .revision-head-link,
  112. .revision-head-edit-button {
  113. margin-left: 0.5em;
  114. font-size: 0.6em;
  115. opacity: 0;
  116. }
  117. &:hover .revision-head-link,
  118. &:hover .revision-head-edit-button {
  119. opacity: 1 !important;
  120. }
  121. }
  122. }
  123. div.body {
  124. padding: 10px;
  125. }
  126. .wiki {
  127. line-height: 1.8em;
  128. font-size: 15px;
  129. @extend %markdown-html;
  130. }
  131. .comment {
  132. line-height: 1.2em;
  133. font-size: 10px;
  134. @extend %markdown-html;
  135. }
  136. // mobile
  137. .page-mobile .wiki .revision-head {
  138. .revision-head-link,
  139. .revision-head-edit-button {
  140. opacity: 0.3;
  141. }
  142. }
  143. @media (max-width: $screen-sm-max) { // {{{ tablet and iphone size
  144. .main-container .main .wiki {
  145. img {
  146. max-width: 100%;
  147. }
  148. }
  149. }