_wiki.scss 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. div.body {
  2. padding: 10px;
  3. }
  4. // hljs
  5. .wiki {
  6. @import 'hljs';
  7. }
  8. .wiki {
  9. @extend .text-break;
  10. font-size: 15px;
  11. // override line-height except hljs and child of it.
  12. :not(pre*) {
  13. line-height: 1.8em;
  14. }
  15. h1,
  16. h2,
  17. h3,
  18. h4,
  19. h5,
  20. h6 {
  21. margin-top: 1.6em;
  22. margin-bottom: 0.8em;
  23. &:first-child {
  24. margin-top: 0;
  25. }
  26. }
  27. h1 {
  28. padding: 0.5em 0;
  29. margin-top: 2em;
  30. font-size: 1.8em;
  31. line-height: 1.1em;
  32. border-bottom: solid 1px transparent;
  33. }
  34. h2 {
  35. padding-bottom: 0.5em;
  36. font-size: 1.4em;
  37. font-weight: bold;
  38. line-height: 1.225;
  39. border-bottom: 1px solid transparent;
  40. }
  41. h3 {
  42. font-size: 1.2em;
  43. font-weight: bold;
  44. }
  45. h4 {
  46. font-size: 1.1em;
  47. font-weight: normal;
  48. }
  49. h5 {
  50. font-size: 1.05em;
  51. font-weight: normal;
  52. }
  53. p {
  54. margin: 15px 0;
  55. font-weight: normal;
  56. }
  57. blockquote {
  58. padding: 0 20px;
  59. margin: 0 0 30px 0;
  60. font-size: 0.9em;
  61. color: lighten($gray-800, 35%);
  62. border-left: 0.3rem solid #ddd;
  63. }
  64. img {
  65. max-width: 100%;
  66. margin: 5px 0;
  67. }
  68. img.emojione {
  69. margin-top: -0.3em !important;
  70. margin-bottom: 0 !important;
  71. border: none;
  72. box-shadow: none;
  73. }
  74. ul,
  75. ol {
  76. padding-left: 30px;
  77. margin: 20px 0;
  78. li {
  79. margin: 5px 0;
  80. line-height: 1.8em;
  81. }
  82. ul,
  83. ol {
  84. margin: 0;
  85. }
  86. }
  87. .task-list {
  88. .task-list-item {
  89. margin: 0 0.2em 0.25em -1.6em;
  90. list-style-type: none;
  91. }
  92. .task-list-item > .task-list {
  93. margin-left: 30px;
  94. }
  95. // use awesome-bootstrap-checkbox
  96. .task-list-item .checkbox input[type='checkbox'] {
  97. // layout
  98. + label {
  99. padding-left: 0.3em;
  100. &:before {
  101. margin-top: 0.4em;
  102. }
  103. }
  104. // styles
  105. cursor: default;
  106. + label {
  107. cursor: default;
  108. opacity: 1;
  109. &:before,
  110. &:after {
  111. cursor: default;
  112. }
  113. }
  114. }
  115. }
  116. .page-template-builder {
  117. position: relative;
  118. .template-create-button {
  119. position: absolute;
  120. top: 8px;
  121. right: 8px;
  122. }
  123. }
  124. .highlighted {
  125. background-color: $warning;
  126. }
  127. .revision-head {
  128. a {
  129. text-decoration: none;
  130. }
  131. .revision-head-link,
  132. .revision-head-edit-button {
  133. margin-left: 0.5em;
  134. font-size: 0.6em;
  135. opacity: 0;
  136. }
  137. &:hover .revision-head-link,
  138. &:hover .revision-head-edit-button {
  139. opacity: 1 !important;
  140. }
  141. }
  142. $ratio: 0.95;
  143. &.comment {
  144. font-size: 14px;
  145. line-height: 1.5em;
  146. h1,
  147. h2,
  148. h3,
  149. h4,
  150. h5,
  151. h6 {
  152. margin-top: 1.6em * $ratio;
  153. margin-bottom: 0.8em * $ratio;
  154. &:first-child {
  155. margin-top: 15px;
  156. }
  157. }
  158. h1 {
  159. padding-bottom: 0.3em * $ratio;
  160. margin-top: 2em * $ratio;
  161. font-size: 1.8em * $ratio;
  162. line-height: 1.1em * $ratio;
  163. }
  164. h2 {
  165. padding-bottom: 0.5em * $ratio;
  166. font-size: 1.4em * $ratio;
  167. line-height: 1.225 * $ratio;
  168. }
  169. h3 {
  170. font-size: 1.2em * $ratio;
  171. }
  172. blockquote {
  173. font-size: 0.9em * $ratio;
  174. }
  175. img.emojione {
  176. margin-top: -0.3em * $ratio !important;
  177. }
  178. ul,
  179. ol {
  180. padding-left: 15px;
  181. margin: 10px 0;
  182. li {
  183. line-height: 1.1em;
  184. }
  185. }
  186. .revision-head {
  187. .revision-head-link,
  188. .revision-head-edit-button {
  189. margin-left: 0.5em * $ratio;
  190. font-size: 0.6em * $ratio;
  191. }
  192. }
  193. }
  194. }
  195. // mobile
  196. .page-mobile .wiki .revision-head {
  197. .revision-head-link,
  198. .revision-head-edit-button {
  199. opacity: 0.3;
  200. }
  201. }
  202. @include media-breakpoint-down(sm) {
  203. .main .wiki {
  204. img {
  205. max-width: 100%;
  206. }
  207. }
  208. }