_wiki.scss 4.7 KB

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