_wiki.scss 3.6 KB

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