_wiki.scss 4.6 KB

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