_wiki.scss 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  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 {
  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. box-shadow: 0 0 5px 0px rgba(0,0,0,.2);
  121. border: solid 1px #ccc;
  122. max-width: 100%;
  123. }
  124. .noborder img, .img.noborder {
  125. box-shadow: none;
  126. border: none;
  127. }
  128. img.emojione {
  129. margin-top: -0.3em !important;
  130. margin-bottom: 0 !important;
  131. border: none;
  132. box-shadow: none;
  133. }
  134. ul, ol {
  135. padding-left: 30px;
  136. margin: 20px 0;
  137. li {
  138. margin: 5px 0;
  139. line-height: 1.8em;
  140. }
  141. ul, ol {
  142. margin: 0;
  143. }
  144. }
  145. pre.hljs {
  146. position: relative;
  147. cite {
  148. position: absolute;
  149. top: 0;
  150. right: 0;
  151. padding: 0 4px;
  152. background: #ccc;
  153. color: #333;
  154. font-style: normal;
  155. font-weight: bold;
  156. opacity: 0.6;
  157. }
  158. };
  159. p code { // only inline code blocks
  160. font-family: $font-family-monospace-not-strictly;
  161. }
  162. .page-template-builder {
  163. position: relative;
  164. .template-create-button {
  165. position: absolute;
  166. top: 8px;
  167. right: 8px;
  168. }
  169. }
  170. .highlighted {
  171. &em {
  172. padding: 2px;
  173. margin: 0 -2px;
  174. font-weight: bold;
  175. }
  176. font-style: normal;
  177. color: #333;
  178. background-color: rgba(255,255,140,0.5);
  179. border-radius: 3px;
  180. }
  181. // {{{ table (copied from bootstrap .table
  182. table {
  183. width: 100%;
  184. margin-bottom: $line-height-computed;
  185. // Cells
  186. > thead,
  187. > tbody,
  188. > tfoot {
  189. > tr {
  190. > th,
  191. > td {
  192. padding: $table-cell-padding;
  193. line-height: $line-height-base;
  194. vertical-align: top;
  195. border-top: 1px solid $table-border-color;
  196. }
  197. }
  198. }
  199. // Bottom align for column headings
  200. > thead > tr > th {
  201. vertical-align: bottom;
  202. border-bottom: 2px solid $table-border-color;
  203. }
  204. // Remove top border from thead by default
  205. > caption + thead,
  206. > colgroup + thead,
  207. > thead:first-child {
  208. > tr:first-child {
  209. > th,
  210. > td {
  211. border-top: 0;
  212. }
  213. }
  214. }
  215. // Account for multiple tbody instances
  216. > tbody + tbody {
  217. border-top: 2px solid $table-border-color;
  218. }
  219. // Nesting
  220. table {
  221. background-color: $body-bg;
  222. }
  223. // .table-bordered
  224. border: 1px solid $table-border-color;
  225. > thead,
  226. > tbody,
  227. > tfoot {
  228. > tr {
  229. > th,
  230. > td {
  231. border: 1px solid $table-border-color;
  232. }
  233. }
  234. }
  235. > thead > tr {
  236. > th,
  237. > td {
  238. border-bottom-width: 2px;
  239. }
  240. }
  241. }
  242. // }}}
  243. }
  244. @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { // {{{ tablet size
  245. .crowi.main-container .main .wiki {
  246. }
  247. } // }}}
  248. @media (max-width: $screen-xs-max) { // {{{ iPhone size
  249. .crowi.main-container .main .wiki {
  250. }
  251. } // }}}
  252. @media (max-width: $screen-sm-max) { // {{{ tablet and iphone size
  253. .crowi.main-container .main .wiki {
  254. img {
  255. max-width: 100%;
  256. }
  257. }
  258. }