_wiki.scss 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. div.body {
  2. padding: 10px;
  3. }
  4. .revision-toc {
  5. float: right;
  6. font-size: .9em;
  7. border: solid 1px #aaa;
  8. border-radius: 5px;
  9. max-width: 250px;
  10. overflow: hidden;
  11. .revision-toc-head {
  12. display: inline-block;
  13. float: right;
  14. border-left: solid 1px #aaa;
  15. border-bottom: solid 1px #aaa;
  16. border-radius: 0 5px;
  17. padding: 3px 11px;
  18. font-weight: bold;
  19. background: #f0f0f0;
  20. margin-left: 5px;
  21. margin-bottom: 5px;
  22. &.collapsed {
  23. border: none;
  24. margin: 0;
  25. }
  26. }
  27. .revision-toc-content {
  28. background: #fcfcfc;
  29. padding: 10px;
  30. > ul {
  31. margin: 4px 4px 4px 15px;
  32. padding: 5px;
  33. }
  34. }
  35. }
  36. .revision-head {
  37. .revision-head-link,
  38. .revision-head-edit-button {
  39. visibility: hidden;
  40. font-size: 0.6em;
  41. padding-top: 4px;
  42. padding-left: 10px;
  43. }
  44. &:hover .revision-head-link,
  45. &:hover .revision-head-edit-button {
  46. visibility: unset;
  47. }
  48. }
  49. .wiki {
  50. line-height: 1.8em;
  51. font-size: 15px;
  52. h1, h2, h3, h4, h5, h6 {
  53. margin-top: 1.6em;
  54. margin-bottom: .8em;
  55. &:first-child {
  56. margin-top: 0;
  57. }
  58. }
  59. h1 {
  60. margin-top: 2em;
  61. padding-bottom: 0.3em;
  62. font-size: 1.8em;
  63. border-bottom: solid 1px #ccc;
  64. }
  65. h2 {
  66. padding-bottom: 0.5em;
  67. font-size: 1.4em;
  68. line-height: 1.225;
  69. font-weight: bold;
  70. border-bottom: 1px solid #eee;
  71. }
  72. h3 {
  73. font-size: 1.2em;
  74. font-weight: bold;
  75. }
  76. h4 {
  77. font-size: 1.1em;
  78. font-weight: normal;
  79. }
  80. h5 {
  81. font-size: 1.05em;
  82. font-weight: normal;
  83. }
  84. p {
  85. font-weight: normal;
  86. margin: 15px 0;
  87. }
  88. blockquote {
  89. font-size: .9em;
  90. margin: 0 0 30px 0;
  91. padding: 0 20px;
  92. color: darken(gray, 10%);
  93. }
  94. a {
  95. text-decoration: underline;
  96. color: #38ad9e;
  97. &:hover {
  98. text-decoration: none;
  99. color: darken(#38ad9e, 10%);
  100. }
  101. }
  102. /* ensure to disable in crowi-plus system
  103. pre {
  104. line-height: 1.4em;
  105. font-size: .9em;
  106. border: none;
  107. background: #444;
  108. color: #f0f0f0;
  109. font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  110. word-wrap: break-word;
  111. }
  112. */
  113. pre {
  114. border: none;
  115. }
  116. img {
  117. margin: 5px 0;
  118. box-shadow: 0 0 5px 0px rgba(0,0,0,.2);
  119. border: solid 1px #ccc;
  120. max-width: 100%;
  121. }
  122. .noborder img, .img.noborder {
  123. box-shadow: none;
  124. border: none;
  125. }
  126. img.emoji {
  127. width: 0.95em;
  128. margin: 1px;
  129. border: none;
  130. box-shadow: none;
  131. vertical-align: middle;
  132. display: inline;
  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. /* ensure to disable in crowi-plus
  146. .wiki-code {
  147. position: relative;
  148. cite {
  149. position: absolute;
  150. top: 0;
  151. right: 0;
  152. padding: 0 4px;
  153. background: #ccc;
  154. color: #333;
  155. font-size: .8em;
  156. }
  157. };
  158. */
  159. .page-template-builder {
  160. position: relative;
  161. .template-create-button {
  162. position: absolute;
  163. top: 8px;
  164. right: 8px;
  165. }
  166. }
  167. .highlighted {
  168. &em {
  169. padding: 2px;
  170. margin: 0 -2px;
  171. font-weight: bold;
  172. }
  173. font-style: normal;
  174. color: #333;
  175. background-color: rgba(255,255,140,0.5);
  176. border-radius: 3px;
  177. }
  178. // {{{ table (copied from bootstrap .table
  179. table {
  180. width: 100%;
  181. margin-bottom: $line-height-computed;
  182. // Cells
  183. > thead,
  184. > tbody,
  185. > tfoot {
  186. > tr {
  187. > th,
  188. > td {
  189. padding: $table-cell-padding;
  190. line-height: $line-height-base;
  191. vertical-align: top;
  192. border-top: 1px solid $table-border-color;
  193. }
  194. }
  195. }
  196. // Bottom align for column headings
  197. > thead > tr > th {
  198. vertical-align: bottom;
  199. border-bottom: 2px solid $table-border-color;
  200. }
  201. // Remove top border from thead by default
  202. > caption + thead,
  203. > colgroup + thead,
  204. > thead:first-child {
  205. > tr:first-child {
  206. > th,
  207. > td {
  208. border-top: 0;
  209. }
  210. }
  211. }
  212. // Account for multiple tbody instances
  213. > tbody + tbody {
  214. border-top: 2px solid $table-border-color;
  215. }
  216. // Nesting
  217. table {
  218. background-color: $body-bg;
  219. }
  220. // .table-bordered
  221. border: 1px solid $table-border-color;
  222. > thead,
  223. > tbody,
  224. > tfoot {
  225. > tr {
  226. > th,
  227. > td {
  228. border: 1px solid $table-border-color;
  229. }
  230. }
  231. }
  232. > thead > tr {
  233. > th,
  234. > td {
  235. border-bottom-width: 2px;
  236. }
  237. }
  238. }
  239. // }}}
  240. }
  241. @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { // {{{ tablet size
  242. .crowi.main-container .main .wiki {
  243. }
  244. } // }}}
  245. @media (max-width: $screen-xs-max) { // {{{ iPhone size
  246. .crowi.main-container .main .wiki {
  247. }
  248. } // }}}
  249. @media (max-width: $screen-sm-max) { // {{{ tablet and iphone size
  250. .crowi.main-container .main .wiki {
  251. img {
  252. max-width: 100%;
  253. }
  254. }
  255. }