_wiki.scss 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  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. pre {
  98. line-height: 1.4em;
  99. font-size: .9em;
  100. border: none;
  101. background: #444;
  102. color: #f0f0f0;
  103. font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  104. word-wrap: break-word;
  105. }
  106. img {
  107. margin: 5px 0;
  108. box-shadow: 0 0 5px 0px rgba(0,0,0,.2);
  109. border: solid 1px #ccc;
  110. max-width: 100%;
  111. }
  112. .noborder img, .img.noborder {
  113. box-shadow: none;
  114. border: none;
  115. }
  116. img.emoji {
  117. width: 1.1em;
  118. margin: 1px;
  119. border: none;
  120. box-shadow: none;
  121. vertical-align: middle;
  122. display: inline;
  123. }
  124. ul, ol {
  125. padding-left: 30px;
  126. li {
  127. line-height: 1.8em;
  128. p {
  129. margin-top: 10px;
  130. margin-bottom: 0;
  131. &:first-child {
  132. margin-top: 0;
  133. }
  134. }
  135. }
  136. }
  137. .wiki-code {
  138. position: relative;
  139. cite {
  140. position: absolute;
  141. top: 0;
  142. right: 0;
  143. padding: 0 4px;
  144. background: #ccc;
  145. color: #333;
  146. font-size: .8em;
  147. }
  148. };
  149. .page-template-builder {
  150. position: relative;
  151. .template-create-button {
  152. position: absolute;
  153. top: 8px;
  154. right: 8px;
  155. }
  156. }
  157. .highlighted {
  158. &em {
  159. padding: 2px;
  160. margin: 0 -2px;
  161. font-weight: bold;
  162. }
  163. font-style: normal;
  164. color: #333;
  165. background-color: rgba(255,255,140,0.5);
  166. border-radius: 3px;
  167. }
  168. // {{{ table (copied from bootstrap .table
  169. table {
  170. width: 100%;
  171. margin-bottom: $line-height-computed;
  172. // Cells
  173. > thead,
  174. > tbody,
  175. > tfoot {
  176. > tr {
  177. > th,
  178. > td {
  179. padding: $table-cell-padding;
  180. line-height: $line-height-base;
  181. vertical-align: top;
  182. border-top: 1px solid $table-border-color;
  183. }
  184. }
  185. }
  186. // Bottom align for column headings
  187. > thead > tr > th {
  188. vertical-align: bottom;
  189. border-bottom: 2px solid $table-border-color;
  190. }
  191. // Remove top border from thead by default
  192. > caption + thead,
  193. > colgroup + thead,
  194. > thead:first-child {
  195. > tr:first-child {
  196. > th,
  197. > td {
  198. border-top: 0;
  199. }
  200. }
  201. }
  202. // Account for multiple tbody instances
  203. > tbody + tbody {
  204. border-top: 2px solid $table-border-color;
  205. }
  206. // Nesting
  207. table {
  208. background-color: $body-bg;
  209. }
  210. // .table-bordered
  211. border: 1px solid $table-border-color;
  212. > thead,
  213. > tbody,
  214. > tfoot {
  215. > tr {
  216. > th,
  217. > td {
  218. border: 1px solid $table-border-color;
  219. }
  220. }
  221. }
  222. > thead > tr {
  223. > th,
  224. > td {
  225. border-bottom-width: 2px;
  226. }
  227. }
  228. }
  229. // }}}
  230. }
  231. @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { // {{{ tablet size
  232. .crowi.main-container .main .wiki {
  233. }
  234. } // }}}
  235. @media (max-width: $screen-xs-max) { // {{{ iPhone size
  236. .crowi.main-container .main .wiki {
  237. }
  238. } // }}}
  239. @media (max-width: $screen-sm-max) { // {{{ tablet and iphone size
  240. .crowi.main-container .main .wiki {
  241. img {
  242. max-width: 100%;
  243. }
  244. }
  245. }