_wiki.scss 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. // import crowi variable
  2. @import 'utilities';
  3. div.body {
  4. padding: 10px;
  5. }
  6. .revision-toc {
  7. float: right;
  8. font-size: .9em;
  9. border: solid 1px #aaa;
  10. border-radius: 5px;
  11. max-width: 250px;
  12. overflow: hidden;
  13. .revision-toc-head {
  14. display: inline-block;
  15. float: right;
  16. border-left: solid 1px #aaa;
  17. border-bottom: solid 1px #aaa;
  18. border-radius: 0 5px;
  19. padding: 3px 11px;
  20. font-weight: bold;
  21. background: #f0f0f0;
  22. margin-left: 5px;
  23. margin-bottom: 5px;
  24. &.collapsed {
  25. border: none;
  26. margin: 0;
  27. }
  28. }
  29. .revision-toc-content {
  30. background: #fcfcfc;
  31. padding: 10px;
  32. > ul > li { // first level of li
  33. margin: 4px 4px 4px 15px;
  34. padding: 5px;
  35. }
  36. }
  37. }
  38. .revision-head {
  39. .revision-head-link,
  40. .revision-head-edit-button {
  41. visibility: hidden;
  42. font-size: 0.6em;
  43. padding-top: 4px;
  44. padding-left: 10px;
  45. }
  46. &:hover .revision-head-link,
  47. &:hover .revision-head-edit-button {
  48. visibility: unset;
  49. }
  50. }
  51. .wiki {
  52. line-height: 1.8em;
  53. font-size: 15px;
  54. h1, h2, h3, h4, h5, h6 {
  55. margin-top: 1.6em;
  56. margin-bottom: .8em;
  57. &:first-child {
  58. margin-top: 0;
  59. }
  60. }
  61. h1 {
  62. margin-top: 2em;
  63. padding-bottom: 0.3em;
  64. font-size: 1.8em;
  65. border-bottom: solid 1px #ccc;
  66. }
  67. h2 {
  68. padding-bottom: 0.5em;
  69. font-size: 1.4em;
  70. line-height: 1.225;
  71. font-weight: bold;
  72. border-bottom: 1px solid #eee;
  73. }
  74. h3 {
  75. font-size: 1.2em;
  76. font-weight: bold;
  77. }
  78. h4 {
  79. font-size: 1.1em;
  80. font-weight: normal;
  81. }
  82. h5 {
  83. font-size: 1.05em;
  84. font-weight: normal;
  85. }
  86. p {
  87. font-weight: normal;
  88. margin: 15px 0;
  89. }
  90. blockquote {
  91. font-size: .9em;
  92. margin: 0 0 30px 0;
  93. padding: 0 20px;
  94. color: darken(gray, 10%);
  95. }
  96. a {
  97. text-decoration: underline;
  98. color: #38ad9e;
  99. &:hover {
  100. text-decoration: none;
  101. color: darken(#38ad9e, 10%);
  102. }
  103. }
  104. /* ensure to disable in crowi-plus system
  105. pre {
  106. line-height: 1.4em;
  107. font-size: .9em;
  108. border: none;
  109. background: #444;
  110. color: #f0f0f0;
  111. font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  112. word-wrap: break-word;
  113. }
  114. */
  115. pre {
  116. border: none;
  117. }
  118. img {
  119. margin: 5px 0;
  120. /* ensure to disable in crowi-plus system
  121. box-shadow: 0 0 5px 0px rgba(0,0,0,.2);
  122. border: solid 1px #ccc;
  123. */
  124. max-width: 100%;
  125. }
  126. /* ensure to disable in crowi-plus system
  127. .noborder img, .img.noborder {
  128. box-shadow: none;
  129. border: none;
  130. }
  131. */
  132. img.emojione {
  133. margin-top: -0.3em !important;
  134. margin-bottom: 0 !important;
  135. border: none;
  136. box-shadow: none;
  137. }
  138. ul, ol {
  139. padding-left: 30px;
  140. margin: 20px 0;
  141. li {
  142. margin: 5px 0;
  143. line-height: 1.8em;
  144. }
  145. ul, ol {
  146. margin: 0;
  147. }
  148. }
  149. // borrowed from https://www.npmjs.com/package/github-markdown-css
  150. .contains-task-list {
  151. .task-list-item {
  152. list-style-type: none;
  153. }
  154. .task-list-item+.task-list-item {
  155. margin-top: 3px;
  156. }
  157. .task-list-item input {
  158. margin: 0 0.2em 0.25em -1.6em;
  159. vertical-align: middle;
  160. }
  161. }
  162. pre.hljs {
  163. position: relative;
  164. cite {
  165. position: absolute;
  166. top: 0;
  167. right: 0;
  168. padding: 0 4px;
  169. background: #ccc;
  170. color: #333;
  171. font-style: normal;
  172. font-weight: bold;
  173. opacity: 0.6;
  174. }
  175. };
  176. p code { // only inline code blocks
  177. font-family: $font-family-monospace-not-strictly;
  178. }
  179. .page-template-builder {
  180. position: relative;
  181. .template-create-button {
  182. position: absolute;
  183. top: 8px;
  184. right: 8px;
  185. }
  186. }
  187. .highlighted {
  188. &em {
  189. padding: 2px;
  190. margin: 0 -2px;
  191. font-weight: bold;
  192. }
  193. font-style: normal;
  194. color: #333;
  195. background-color: rgba(255,255,140,0.5);
  196. border-radius: 3px;
  197. }
  198. }
  199. @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { // {{{ tablet size
  200. .crowi.main-container .main .wiki {
  201. }
  202. } // }}}
  203. @media (max-width: $screen-xs-max) { // {{{ iPhone size
  204. .crowi.main-container .main .wiki {
  205. }
  206. } // }}}
  207. @media (max-width: $screen-sm-max) { // {{{ tablet and iphone size
  208. .crowi.main-container .main .wiki {
  209. img {
  210. max-width: 100%;
  211. }
  212. }
  213. }