_wiki.scss 4.6 KB

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