_wiki.scss 4.2 KB

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